Yesterday I had an issue where I could not for the life of me figure out how to get a damn directory copied when doing a publish in Visual Studio.
I finally found the solution after digging through a ton of Microsoft Documentation and Stack Overflow.
If you are also trying to accomplish this, here is a quick snippet of my ViewController.csproj from my .NET Core app.
<Folder Include=”Certificates\” />
<CommonFiles Include=”Certificates\*” />
<ContentWithTargetPath Include=”@(CommonFiles)” TargetPath=”Certificates\%(FileName)%(Extension)” CopyToPublishDirectory=”Always” />
You’ll notice that I am trying to ensure the “Certificates” folder is copied which is at the base directory of the Project.
Included below is a picture of what it would look like in your own *.csproj