我下载了visual studio 2010的源代码
通过visual 2012打开解决方案文件。它将源代码隐藏到2012年,并打开解决方案。
当我构建解决方案时出现了错误:
错误1类型“System.Web.Mvc.ModelClientValidationRule”存在于'c:\Program (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll‘和'c:\Program (x86)\Microsoft ASP.NET\ASP.NET Web C:\studyCode\MVCDemo-Part12\MVCDemo-Part12\MVCDemo\Attributes\Validation\EqualAttribute.cs 54 28 MVCDemo中。
发布于 2013-02-05 14:41:40
只需从解决方案引用中删除System.Web.WebPages
发布于 2013-02-07 09:24:42
这个答案也可以解决你的问题:
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:
<Reference Include="System.Web.WebPages"/>
<Reference Include="System.Web.Helpers" />
代之以下列案文:
<Reference Include="System.Web.WebPages, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL "/>
<Reference Include="System.Web.Helpers, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL "/>
4.保存更改,关闭正在编辑的项目(.csproj)文件,然后右键单击项目并选择Reload。
参考资料:http://forums.asp.net/t/1723108.aspx/1
也可以尝试:Toc303253815
或您也可以尝试此
编辑:
ProjectName.csproj
变化
<Reference Include="System.Web.WebPages"/>
至
<Reference Include="System.Web.WebPages, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL "/><br/><br/>
发布于 2013-09-16 23:02:05
右键单击VS2010中的项目名称。单击“添加可部署依赖项”。重建
https://stackoverflow.com/questions/14710099
复制相似问题