zoukankan      html  css  js  c++  java
  • DAL 层引用 System.Net.Http ,引发的一阵心慌

    快下班的时候 代码data 数据层编译失败,引起整个解决方案全部失败;
    其他同事虽然vs 版本不同,但是都能编译通过;考虑到今天更改过vs 的设置,把今天更改的设置全部都恢复,结果还是不行。最后直接恢复了原始设置;编译还是失败;
    这时候才想起来看看编译日志具体的错误,编译日志:

    MSB3268: The primary reference "data, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL"
    could not be resolved because it has an indirect dependency on the framework assembly "System.Net.Http, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0".
    To resolve this problem, either remove the reference "data, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL"
    or retarget your application to a framework version which contains "System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

    到NETFramework v4.0 下找System.Net.Http 果然没有,从其他地方copy 一个放入目录,还是不行;
    顺着这条线索 接着查 发现这玩意竟然是asp.net mvc 里的; 下载安装asp.net mvc 4 后,重新编译项目 问题迎刃而解了。。。

  • 相关阅读:
    5.5团队冲刺08
    5.6团队冲刺09
    5.4团队冲刺07
    5.3团队冲刺06
    5.2团队冲刺05
    第14 周作业
    CentOS Linux release 7.4 yum 安装mariadb-5.5.65 登录报错 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/data/mysql/mysql.sock' (2)
    第13周作业
    解析函数
    npm模块安装机制
  • 原文地址:https://www.cnblogs.com/baoconghui/p/9015401.html
Copyright © 2011-2022 走看看