VS2017 nlog源碼查看報錯


最近下載nlog的源碼學習,打開解決方案以后無法編譯。

 

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets

<NETSdkError Condition="'$(_TargetFrameworkVersionWithoutV)' >= '$(NETStandardMaximumVersionExclusive)'"
ResourceName="UnsupportedTargetFrameworkVersion"
FormatArguments=".NET Standard;$(_TargetFrameworkVersionWithoutV);$(NETStandardMaximumVersionHumanReadable)"
/>

126行報錯。

 

 

the current .NET SDK does not support targeting .NET Standard 2.0. Either target .NET Standard 1.6 or lower, or use a version of the .NET SDK that supports .NET Standard 2.0

通過這句英文一直以為是 .net framework 2.0未安裝。

安裝以后引用不報錯(沒有黃色感嘆號),編譯的時候卻還是報錯。

 

最終谷歌找到了。

原文地址

https://stackoverflow.com/questions/45732236/the-current-net-sdk-does-not-support-targeting-net-standard-2-0-error-in-visua

安裝 .net core 2.0可以解決。

https://www.microsoft.com/net/download/core

 

 

百度很久沒答案,所以用中文記錄一下,避免大家后續繼續踩微軟的坑。


免責聲明!

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



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