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 后,重新編譯項目 問題迎刃而解了。。。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM