依赖于框架程序集"System.Runtime,Version = 4.0.10.0",这在目前的目标框架中无法解决

 草业学院16级草坪1班团支部s_b9w 发布于 2022-12-11 13:27

TFS 2013 - Build:ASP.Net 4.5.1网站我收到此错误:

warning MSB3268: The primary reference "C:\Builds\2\MyProj\Web1_Main\bin\MyProj1.dll"
 could not be resolved because it has an indirect dependency on the framework assembly 
"System.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which
 could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.5.1". To resolve this problem, either remove the reference 
"C:\Builds\2\MyProj\Web1_Main\bin\MyProj1.dll" or retarget your application to a framework 
version which contains "System.Runtime, Version=4.0.10.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a".

最初使用Unity 1.0.0.0的所有项目和站点都是4.0.我将其升级到4.5.2.此外,上述错误中的MyProj1引用了Unity,我也将其升级到3.5.1.

阅读本文:https://unity.codeplex.com/workitem/12756 构建服务器已在变通方法中指向更新的4.5.2.

所以我降级到4.5.1,但仍然得到错误.

解决方案通过Visual Studio 2013在本地构建良好.

该独立的类库项目建设TFS正常,但当的Myproj被添加到我的网站的参考,当它失败的.

有任何想法吗?

在升级时,我是否需要除TragetFramework settign之外的任何web.config更改?

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有