An error occurred while running the mvc3 program after installing vs11.

Source: Internet
Author: User

Error:

Error 2 type "system. web. MVC. modelclientvalidationrule exists in "C: \ Program Files (x86) \ Microsoft ASP. net \ ASP. net web pages \ V2.0 \ assemblies \ system. web. webpages. DLL and c: \ Program Files (x86) \ Microsoft ASP. net \ ASP. net MVC 3 \ assemblies \ system. web. MVC. DLL "in E: \ TMP \ MVC \ MvcMusicStore-v2.0 \ mvcmusicstore-completed \ mvcmusicstore \ models \ accountmodels. cs24328mvcmusicstore

 

Solution:

You can modify the settings as follows to maintain compatibility:

(1) modify web. config. Add a node with the key webpages: version and value 1.0.0.0, that is:

 <Deleetask>  
<Add Key = "Webpages: version" Value = "1.0.0.0" />
<Add Key = "Clientvalidationenabled" Value = "True" />
<Add Key = "Unobtrusivejavascriptenabled" Value = "True" />
</Appsettings>
(2) modify Projectname . Csproj. (Open in Notepad directly)
Search:
 
<ReferenceInclude="System. Web. webpages"/> 
<ReferenceInclude="System. Web. helpers"/>
Replace:
<ReferenceInclude="System. Web. webpages, version = 1.0.0.0,
Culture = neutral, publickeytoken = 31bf3856ad364e35, processorarchitecture = msil"
/>
<ReferenceInclude="System. Web. helpers, version = 1.0.0.0,
Culture = neutral, publickeytoken = 31bf3856ad364e35, processorarchitecture = msil"
/>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.