Excluding files and folders from your published .Net Core web project

You can exclude files or folders from your published .Net Core project by editing your project file. In Visual Studio, click on the project to open the projectName.csproj file. To exclude the file wwwroot\json\example.json, add the following.      <ItemGroup>           <Content Update="wwwroot\json\example.json" CopyToPublishDirectory="Never" /> </ItemGroup>        To exclude all json files in that folder, add: <ItemGroup>     […]

Read More…