VS2013无法编译ASP.NET MVC5意见 [英] VS2013 does not compile ASP.NET MVC5 views
问题描述
我的Visual Studio 2013旗舰版4更新不编译ASP.NET MVC 5次。
My Visual Studio Ultimate 2013 Update 4 does not compile ASP.NET MVC 5 views.
编译错误上发现零星的看法,尽管编译总是成功的。智能感知也开启和关闭的意见。我会说这是在VS2012的工作显著更好的(我不太MVC上的版本)。
Compilation errors are spotted on views sporadically, although compilation is always successful. Intellisense is also on and off on the views. I would say it was working significantly better in VS2012 (I did not much MVC on that version).
我已尝试添加< MvcBuildViews>真< / MvcBuildViews>
到.csproj的文件,使用VS2010中工作的事情,但它不工作了
I have tried to add <MvcBuildViews>true</MvcBuildViews>
to the .csproj file, thing that uses to work in VS2010, but it is not working anymore.
任何想法可能是什么问题?
Any idea what could be the problem?
更新:我正在寻找在看到视图的错误的方式,因为它是在VS的previous版本发生
推荐答案
请问您的项目包括目标和挂钩到后建立的事件吗?尝试的MSBuild WebApplication1.csproj /吨。MvcBuildViews
的命令行,它会检查是否有两个默认属性设置和目标定义
Does your project include the target and hook into after build event? Try msbuild WebApplication1.csproj /t:MvcBuildViews
from command line, it'll check that you have both default property set and target defined.
<PropertyGroup>
<MvcBuildViews>true</MvcBuildViews>
</PropertyGroup>
<Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" />
</Target>
尝试从VS2013U4中创建一个空MVC项目和的csproj比较你的。
Try creating a blank MVC project from within the VS2013U4 and compare the csproj to yours.
这篇关于VS2013无法编译ASP.NET MVC5意见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!