title: Trouble Precompiling Views After Updating to .NET Framework 4.6
body: <p>We are in the process of upgrading our ASP.Net (MVC 5) project from .NET Framework 4.5.2 to .NET Framework 4.6.  We have not updated to MVC 6, yet.</p>
  
  <p>We have the MvcBuildViews project property set to true.  This has worked fine in the past, but after changing the project's Target Framework to ".NET Framework 4.6," we get the following error at build time:</p>
  
  <blockquote>
    <p>error MSB6004: The specified task executable location
    "C:\windows\Microsoft.NET\Framework64\aspnet_compiler.exe" is invalid.</p>
  </blockquote>
  
  <p>This also occurs when invoking MSBuild.exe directly with the following command line:</p>
  
  <blockquote>
    <p>C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe .\Estream.sln /m
    /nologo /p:Configuration=Debug;Platform=Mixed Platforms
    /property:MvcBuildViews=true /t:build /v:m</p>
  </blockquote>
  
  <p>Has anybody else seen a similar problem?  What do I need to do differently using .NET Framework 4.6 in order to precompile views?</p>
  
  <p>I am aware of the ICompileModule and RazorPreCompileModule <a href="http://www.strathweb.com/2014/12/razor-views-pre-compilation-asp-net-5-mvc-6/" rel="nofollow">as mentioned here</a>, but we are not using MVC 6.</p>
  
  <p>Any help would be greatly appreciated.</p>