Open your ASP.NET Webforms or MVC .csproj file in WordPad and find:
<Target Name="AfterBuild">Make it look like this to cause views to compile when building in release mode:
</Target>
<Target Name="AfterBuild" Condition="'$(Configuration)' == 'Release'">Be aware of xml comments <!-- --> around the AfterBuild tags that will keep your change from getting used.
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" /></Target>
The effect is compiler errors in your views will show up when you compile in release mode, and not just when that view is open in Visual Studio.
No comments:
Post a Comment