adding views to bin deploy set causes error
I am setting up an ASP.Net MVC app for bin deployment. Since I would like to include the compiled views in the relea开发者_C百科se I followed the advice from Steven Sanderson's Pro MVC book and changed my app.csproj file to include
<Target Name="AfterBuild" Condition="'$(Configuration)'=='Release'">
<AspNetCompiler VirtualPath="temp" PhysicalPath="$(ProjectDir)" />
</Target>
Unfortunately, this change is causing me a build error.
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
Any idea how to either deal with the error message or get the compiled views into the bin dir in a different way?
Thanks! Duffy
You don't need to compile your views. That's the job of ASP.NET. You could simply go through this blog post and everything should work just fine.
精彩评论