分析一个.NET Core开源项目(Ocelot),打开后发现提示当前版本.NET Core 不支持。
错误信息如下:
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 命令行工具,输入:donet --info
版本高于2.0,为什么还不行呢?
百度……
折腾了好一会儿,才找到 global.json
将.net core版本改为当前版本,然后重新编译,通过了!
1 {2 ??"projects": [ "src", "test" ],3 ??"sdk": {4 ????"version": "2.1.402"5 ??}6 }
.NET Core 版本不支持的问题
原文地址:https://www.cnblogs.com/lfzm/p/9649555.html