试图建立我的.NET 3.5的MVC应用程序在VS2010 Beta2中抛出MVCBuildView错误 [英] Trying to build my .NET 3.5 mvc app in VS2010 Beta2 throws a MVCBuildView error
问题描述
我升级到VS 2010 Beta2的。它升级了我的前哨淋巴结,当我睁开csprojs。
当它问我,我选择留在.NET 3.5,以保持兼容性
I upgraded to VS 2010 Beta2. It upgraded my slns and csprojs when I opened them. When it asked me, I opted to stay in .net 3.5 to keep compatability
的注:原来的项目建设与MVC2 preview2 - 完全相同的版本有什么自带VS2010 的
然而,当我尝试建立我的Web项目包括意见,我碰到一些编译器错误。
However, when I try to build my Web project including the views, I run into some compiler errors.
我有一个Pager.ascx,做使用RouteValueDictionary一些寻呼魔法,但我在编译的时候得到这个错误。
I have a Pager.ascx that does some paging magic using RouteValueDictionary, but I get this error at build time.
50错误类型'System.Web.Routing.RouteValueDictionary同时存在于C:\\ Program Files文件\\参考大会\\微软\\ Framework.NETFramework \\ V4.0 \\ System.Web.dll中'和'C:\\ WINDOWS \\装配\\ GAC_MSIL \\ System.Web.Routing \\ 3.5.0.0__31bf3856ad364e35 \\ System.Web.Routing.dll'C:\\项目\\阶段2 \\来源\\ Kk.Web \\查看\\共享\\ Pager.ascx 8 Kk.Web
Error 50 The type 'System.Web.Routing.RouteValueDictionary' exists in both 'c:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\System.Web.dll' and 'c:\Windows\assembly\GAC_MSIL\System.Web.Routing\3.5.0.0__31bf3856ad364e35\System.Web.Routing.dll' c:\Projects\Phase2\Source\Kk.Web\Views\Shared\Pager.ascx 8 Kk.Web
MvcBuildViews是项目文件中真实的。
MvcBuildViews is true inside the project file.
如何解决此版本错误?
不知何故,我需要告诉编译器ASPX是V3.5(或2.0版,不知道)。但我不知道如何做到这一点。
I somehow need to tell the ASPX compiler to be v3.5 (or v2.0, not sure). But I don't know how to do this.
任何帮助是极大AP preciated。
Any help is greatly appreciated.
CV
推荐答案
我重新审视这个问题,并感谢马斯洛,我能够更好的谷歌和发现这个微软连接错误。
I revisited this problem and thanks to Maslow, I was able to google better and find this Microsoft Connect bug.
<一个href=\"http://connect.microsoft.com/VisualStudio/feedback/details/557798/visual-studio-2010-compile-asp-net-3-5-website-using-net4s-aspnet-compiler-exe\" rel=\"nofollow\">http://connect.microsoft.com/VisualStudio/feedback/details/557798/visual-studio-2010-compile-asp-net-3-5-website-using-net4s-aspnet-compiler-exe
建议在这个问题上周围的工作完美。
The work around suggested on that issue works perfectly.
该解决方案是列在这里, http://forums.asp.net/p/ 1551418 / 3824696.aspx
The solution is listed here, http://forums.asp.net/p/1551418/3824696.aspx
这篇关于试图建立我的.NET 3.5的MVC应用程序在VS2010 Beta2中抛出MVCBuildView错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!