Can I exclude a folder or files when I publish a web site in Visual Studio 2005? I have various resources that I want to keep at hand in the Solution Explorer, such as alte
As a contemporary answer, in Visual Studio 2017 with a .net core site:
You can exclude from publish like so in the csproj, where CopyToPublishDirectory is never.
PreserveNewest
PreserveNewest
PreserveNewest
Never
This is discussed in more detail here: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/visual-studio-publish-profiles?view=aspnetcore-2.2
appsettings.Local.json
The earlier suggestions did not work for me, I'm guessing because visual studio is now using a different publishing mechanism underneath, I presume via the "dotnet publish" cli tool or equivalent underneath.