VSCompile

VS2012加载失败
No exports were found that match the constraint
开始->运行->devenv.exe /resetuserdata->回车,再打开就好了

1.WebGrease
未能加载文件或程序集“WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。找到的程序集清单定义与程序集引用不匹配。 (异常来自 HRESULT:0x80131040) 

解决方法

通过"uninstall-package -f WebGrease"先卸载,然后通过"install-package WebGrease"再下载最新版本,问题解决。

关于使用NuGet程序包卸载和安装: 
● 查看版本:到https://www.nuget.org 
● 删除程序包:uninstall-package -f WebGrease 
● 安装某个版本的程序包:install-package WebGrease -Version 1.3.0


This issue was resolved by upgrading from WebGrease 1.5.2 to 1.6.0 as well as updating Microsoft.AspNet.Web.Optimization

Install-Package Microsoft.AspNet.Web.Optimization 
Update-Package WebGrease
Uninstall-Package Microsoft.AspNet.Web.Optimization
Uninstall-Package WebGrease
Install-Package Microsoft.AspNet.Web.Optimization 
Update-Package WebGrease


      <dependentAssembly>
        <assemblyIdentity name="Microsoft.Practices.Unity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.5.2.14234"/>
      </dependentAssembly>
    </assemblyBinding>
2.System.Web.Mvc
CS0234: 命名空间“Purple”中不存在类型或命名空间名称“Model”(是否缺少程序集引用?)
行 51:     <pages>
行 52:       <namespaces>
行 53: <add namespace="Purple.Model" />  
行 54:         <add namespace="System.Web.Mvc" />
行 55:         <add namespace="System.Web.Mvc.Ajax" />

=> 把Copy local 设成True

3.Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration info 
http://social.msdn.microsoft.com/Forums/vstudio/en-US/58271e39-beca-49ac-90f9-e116fa3dd3c0/mxed-mode-dll-unable-to-load-in-net-40?forum=clr


在配置文件里加上如下信息即可:
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
    <requiredRuntime version="v4.0.20506"/>
  </startup>
</configuration>

 

转载于:https://www.cnblogs.com/sui84/p/8204972.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值