0
我正在为bin部署设置ASP.Net MVC应用程序。因为我想包括释放已编译的意见我也跟着从史蒂芬·桑德森的Pro MVC书的建议,改变了我的app.csproj文件,包括添加视图到bin部署集导致错误
<Target Name="AfterBuild" Condition="'$(Configuration)'=='Release'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" />
</Target>
不幸的是,这种变化是造成我生成错误。
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. C:\Users\sylvie\Documents\Visual Studio 2010\Projects\app\app\obj\release\package\packagetmp\web.config
任何想法如何处理错误信息或以不同的方式获得编译视图到bin目录?
谢谢! Duffy
我已阅读博客文章,它很有帮助。但是,Steven Sanderson的提示是关于编译视图以在发布时捕获视图中的编译时错误。你不必这样做,但如果你不这样做,最终偶尔会遇到生产中的错误观点。 – duffy 2011-02-14 23:19:52