Reputation: 179
In my ASP.NETCore application in root I have some custome folder which a copie paste to publish folder after each publication
So my publication folder looks like this:
In MVC5 it was publishing automaticaly by configurations of application properties
UPDATED
I moved my folder inside wwwroot folder so now VS includes it to publication , but now it's possible reach the files inside by typing in browser url: https://domain/customefolder/secret.xml
So now I have 2 questions:
Upvotes: 2
Views: 2565
Reputation: 239220
There's no way I'm aware of to add a folder in general to be copied to output via the GUI in Visual Studio, only individual files. However, you can edit your .csproj file and add it there:
<ItemGroup>
<Folder Include="MyFolder\" />
</ItemGroup>
Or, you may want to use Content
with a glob:
<ItemGroup>
<Content Include="MyFolder\**\*" />
</ItemGroup>
Upvotes: 2