I'm currently working on a project where I'm adding docx-files to the Layout folder in Visual Studio and then use those ducment files to create Content Types.
The problem is that I can't get the document files programmatically. Using the web browser I can get the files but not using web.GetFolder();. The code is running in a Feature Receiver when a feature is activated.
SPSite site = properties.Feature.Parent as SPSite;
SPWeb web = site.RootWeb;
SPFolder docTempFolder = web.GetFolder("_LAYOUTS/Projekt/DocumentTemplates");
This code give me a collection with zero files.
What am I doing wrong?
Thanks for helping.