Build Errors - 'System.Web.Mvc.ModelClientValidationRule' Conflicts

后端 未结 5 1567
一生所求
一生所求 2020-12-09 03:01

I am trying to \'build\' my MVC3 web app in VS2010 however keep getting the following error:

Error 2 The type \'System.Web.Mvc.ModelClientValidationRule\' exists

5条回答
  •  佛祖请我去吃肉
    2020-12-09 03:38

    Ok try this solution...

    1. In the root Web.config file, add a new entry with the key webPages:Version and the value 1.0.0.0.

      
      
      
      
      
      
      

    2.In Solution Explorer, right-click the project name and then select Unload Project. Then right-click the name again and select Edit ProjectName.csproj.

    3.Locate the following assembly references:

        
        
    

    Replace them with the following:

    
    
    

    4.Save the changes, close the project (.csproj) file you were editing, and then right-click the project and select Reload.

    REFERENCE: http://forums.asp.net/t/1723108.aspx/1

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

提交回复
热议问题