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.
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:
error MSB6004: The specified task executable location "C:\windows\Microsoft.NET\Framework64\aspnet_compiler.exe" is invalid.
This also occurs when invoking MSBuild.exe directly with the following command line:
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
Has anybody else seen a similar problem? What do I need to do differently using .NET Framework 4.6 in order to precompile views?
I am aware of the ICompileModule and RazorPreCompileModule as mentioned here, but we are not using MVC 6.
Any help would be greatly appreciated.