docker build 錯誤 /usr/share/dotnet/sdk/2.1.801/Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference


docker dotnet Restore 的時候報錯, 一度懷疑是linux的dotnet core sdk沒有裝好,
卸了裝, 裝了卸, 試了好幾遍還是無效(Microsoft.Common.CurrentVersion.targets 這個文件的確又是存在的),
找度娘也沒找到解決方案, 
/usr/share/dotnet/sdk/2.1.801/Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.ComponentModel.Annotations". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [xxxxxxx.csproj]

 就一直在vs中瞎點, 當打開xxxx.csproj時發現, 我靠, 居然引用是絕對路徑, 

這個路徑在windows中基本上一致, 不會有問題, 但突然一想, linux哪有C盤啊, 

后邊把System.ComponentModel.Annotations的引用換成成nuget中引用就可以了

 

 


 

 


免責聲明!

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



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