开发者

ModelClientValidationRule conflict

开发者 https://www.devze.com 2023-04-06 19:51 出处:网络
I have installed vs 2011 developer preview side by side with vs 2010. Now when i run my asp.net mvc 3 project in vs 2010 I am getting the following error in开发者_JS百科 my project where i am using Mo

I have installed vs 2011 developer preview side by side with vs 2010. Now when i run my asp.net mvc 3 project in vs 2010 I am getting the following error in开发者_JS百科 my project where i am using ModelClientValidationRule.

The type System.Web.Mvc.ModelClientValidationRule exists in both c:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll and c:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies\System.Web.WebPages.dll

Is this related to vs 2011 conlict with vs 2010 or something else


The accepted answer was "useful" but after installing MVC4 beta today, a few of my MVC 3 projects would not compile. (ModelClientValidationRule conflict) The fix was:

Edit:

ProjectName.csproj

Change

<Reference Include="System.Web.WebPages"/> 

To

<Reference Include="System.Web.WebPages, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL "/>


please see the below release notes :

http://www.asp.net/learn/whitepapers/mvc4-release-notes

Installing ASP.NET MVC 4 Developer Preview breaks ASP.NET MVC 3 RTM applications.

ASP.NET MVC 3 applications that were created with the RTM release (not with the ASP.NET MVC 3 Tools Update release) require the following changes in order to work side-by-side with ASP.NET MVC 4 Developer Preview. Building the project without making these updates results in compilation errors.

http://www.asp.net/learn/whitepapers/mvc4-release-notes#_Toc303253815

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号