本文介绍了allowDefinition的='MachineToApplication'的错误时,从VS2010(但previous构建后只)发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在我的本地计算机上运行没有问题我Asp.Net MVC 2应用程序。只要运行/调试。

但是,如果我已经建立了它,我不能发布呢!我要清理解决方案,并重新发布。我知道这是不是系统的关键,但它真的很烦人。 一键发布不清洁解决方案,然后一键发布

确切的错误是:

解决方案

i had the same problem with my MVC apps. it was frustrating because i still wanted my views to be checked, so i didn't want to turn off MvcBuildViews

luckily i came across a post which gave me the answer. keep the MvcBuildViews as true, then you can add the following line underneath in your project file:

<BaseIntermediateOutputPath>[SomeKnownLocationIHaveAccessTo]</BaseIntermediateOutputPath>

And make that folder not in your project's folder. Works for me. It's not a perfect solution, but it's good for the moment. Make sure you remove the package folder (located inside the obj\Debug and/or obj\Release folder) from your project folder otherwise you'll keep getting the error.

FWIW, MS know about this error...

这篇关于allowDefinition的='MachineToApplication'的错误时,从VS2010(但previous构建后只)发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 07:16