对意见汇编切换后MVC3奇怪的错误 [英] MVC3 Strange error after switching on compilation of views
问题描述
我目前正在与一个剃刀MVC3项目。
我已经switchen观的编制要注意拼写错误等,在编译时间。
I am currently working on a MVC3 project with Razor. I have switchen on compilation of Views to be aware of spelling errors etc. at compile-time.
当我打开的<&MvcBuildViews GT;真< / MvcBuildViews>项目配置文件在编译过程中出现以下错误:
As soon as I switch on the <MvcBuildViews>true</MvcBuildViews> in the projects configuration file a get the following error during compile:
错误1这是使用注册为allowDefinition =应用程序级别之外'MachineToApplication'的节是错误的。这个错误可以通过未被配置为在IIS中应用程序的虚拟目录引起的。
Error 1 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.
我看了几个可能的解决问题的方案,主要是关于IIS和虚拟目录或应用程序。
问题是,我不使用IIS,而是使用默认的Visual Studio开发服务器。
I read several possible solutions to the problem, mostly concerning IIS and virtual Directories or Applications. The problem is, that I do not use IIS, but instead use the default Visual Studio Development Server.
我能做些什么来解决这个问题?
What can I do to solve this problem?
推荐答案
我已经尝试了很多在网上提供不同的解决方案,但他们要么不太符合我的上的问题,或者他们没有工作。
I have tried a lot of different solutions available in the web, but either they did not quite fit onto my problem, or they did not work.
要回顾一下我的问题:
在切换CompileViews后,我立即编译过程中得到了上述错误。
我使用的是默认的VS2010的Visual Studio开发服务器来测试我的MVC应用程序。
After switching CompileViews on, I immediately got the above error during compile. I am using the default Visual Studio Development Server of VS2010 to test my MVC app.
今天,我开于微软开发人员支持的请求,以及 - 我几乎羞于承认这一点 - 有我的回答大约30秒到从技术回调:
Today I opened a request at Microsoft Developer support, and - I am almost ashamed to admit it - got my answer approximately 30 seconds into the callback from the technician:
所有他说的是:请转到您的OBJ文件夹,并删除所有内容。然后重新编译。
和真正是所有花。
所以很多的摇头我自己之后,我想与大家分享的成果。
So after a lot of head-shaking about myself I wanted to share the results with you.
这篇关于对意见汇编切换后MVC3奇怪的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!