遵循土星的“如何开始”指南时:
https://saturnframework.org/tutorials/how-to-start.html
第 4 步说运行:
dotnet tool restore
这是在我的系统上运行它的结果:
PS C:\Users\dharm\Dropbox\Documents\VisualStudio\SaturnSample> dotnet tool restore
Could not execute because the application was not found or a compatible .NET SDK is not installed.
Possible reasons for this include:
* You intended to execute a .NET program:
The application 'tool' does not exist.
* You intended to execute a .NET SDK command:
A compatible installed .NET SDK for global.json version [3.1.200] from [C:\Users\dharm\Dropbox\Documents\VisualStudio\SaturnSample\global.json] was not found.
Install the [3.1.200] .NET SDK or update [C:\Users\dharm\Dropbox\Documents\VisualStudio\SaturnSample\global.json] with an installed .NET SDK:
3.1.405 [C:\Program Files\dotnet\sdk]
5.0.101 [C:\Program Files\dotnet\sdk]
5.0.102 [C:\Program Files\dotnet\sdk]
我看到了一些前进的方向:
安装 .NET SDK 版本 3.1.200(即使我已经有 3.1.405)
将 global.json 更新为以下内容:
{
"sdk": {
"version": "3.1.405"
}
}
- 将 global.json 更新为以下内容(允许比 3.1.200 更新的版本):
{
"sdk": {
"version": "3.1.200",
"rollForward": "latestFeature"
}
}
哪些会推荐给土星?
更新
看起来有一个关于这个问题的拉取请求:
https://github.com/SaturnFramework/Saturn.Template/pull/29
更新 2021-02-10
上面提到的拉取请求并不理想,因为它需要特定版本的 .NET SDK。
我已经提交了一个拉取请求以使用该rollForward
选项: