DAL 层引用 System.Net.Http ,引起的一阵心慌

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

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 后,从新编译项目 问题迎刃而解了。。。app

相关文章
相关标签/搜索