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"/>