我正在为 bin 部署设置一个 ASP.Net MVC 应用程序。由于我想在版本中包含编译后的视图,因此我遵循了 Steven Sanderson 的 Pro MVC 书中的建议,并将我的 app.csproj 文件更改为包含
<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 目录吗?
谢谢!达菲