I have a file that I want to deploy when my web project (an ASP.NET MVC project) is deployed, however I want to remove that file from the solution (it’s a very large CSS file that slows down my solution and crashes VS if I open it by mistake).
Is there a way to make the Azure project include this file so it is added to the package to deploy?
Thanks
One option is to add a BeforeBuild ItemGroup in the project file that will add it. To do that, try the following:
<Target Name=”BeforeBuild”>
<ItemGroup><Content Include=”Content\Site2.css” />
</ItemGroup>
</Target>
4. Save and reload the project file
Now when you package the Azure project including the MVC project, the content that was added in the BeforeBuild target should be in the package.