Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support .NET SDK 5.0.202 and later #82

Closed
rdipardo opened this issue Apr 9, 2021 · 3 comments
Closed

Support .NET SDK 5.0.202 and later #82

rdipardo opened this issue Apr 9, 2021 · 3 comments

Comments

@rdipardo
Copy link
Contributor

rdipardo commented Apr 9, 2021

The current global.json is locked at 5.0.102.

This release is critically flawed on some Linux hosts, where recent versions of nss or ca-certificates can cause package verification to fail during dotnet restore.

After the recommended upgrade to 5.0.202, the build workflow is broken:

$ 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 [5.0.102] from [/home/rob/dev/git/Fornax/global.json] was not found.
      Install the [5.0.102] .NET SDK or update [/home/rob/dev/git/Fornax/global.json] with an installed .NET SDK:
        3.1.407 [/usr/share/dotnet/sdk]
        5.0.202 [/usr/share/dotnet/sdk]

I can resolve this locally by editing global.json to choose the highest installed feature band:

diff --git a/global.json b/global.json
index 12cb7ff..3ca4dc8 100644
--- a/global.json
+++ b/global.json
@@ -1,5 +1,6 @@
 {
   "sdk": {
-    "version": "5.0.102"
+    "version": "5.0.102",
+    "rollForward": "latestFeature"
   }
 }

Environment

.NET SDK (reflecting any global.json):
 Version:   5.0.202
 Commit:    db7cc87d51

Runtime Environment:
 OS Name:     bunsenlabs
 OS Version:  10.5
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/5.0.202/

Host (useful for support):
  Version: 5.0.5
  Commit:  2f740adc14

.NET SDKs installed:
  3.1.407 [/usr/share/dotnet/sdk]
  5.0.202 [/usr/share/dotnet/sdk]

Additional context

@oluwandabira
Copy link
Contributor

oluwandabira commented May 19, 2021

Is this being looked at? It would be nice to have as the current release requires 3.1 and crashes when sub directories are involved.

@rdipardo
Copy link
Contributor Author

rdipardo commented May 19, 2021

Just to clarify, it only seems like "the current release requires 3.1" because the installed version of fake-cli is incompatible with newer SDKs:

$ dotnet tool restore
Tool 'fake-cli' (version '5.20.3') was restored. Available commands: fake
Tool 'paket' (version '5.257.0') was restored. Available commands: paket

Restore was successful.

$  dotnet fake build
Performance:
 - Cli parsing: 814 milliseconds
 - Packages: 1 second
 - Script analyzing: 507 milliseconds
 - Runtime: 4 seconds
There was a problem while setting up the environment:
-> Extracting platforms from path 'net5.0' failed, a newer Paket version might support it, otherwise please open an issue for a missing platform handler.
Hint: If you just upgraded the fake-runner you can try to remove the .fake directory and try again.

The latest version of fake-cli is the first one to fully support net5.0 (meaning, SDKs beyond 5.0.102):

diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 153c26c..b9fdb39 100644  
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
   "isRoot": true,
   "tools": {
     "fake-cli": {
-      "version": "5.20.3",    
+      "version": "5.20.4",
       "commands": [
         "fake"
       ]
$ dotnet tool restore
Tool 'fake-cli' (version '5.20.4') was restored. Available commands: fake
Tool 'paket' (version '5.257.0') was restored. Available commands: paket

Restore was successful.

$ dotnet fake build
Building project with version: LocalBuild
[ . . . ]
---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target         Duration
------         --------
Clean          00:00:00.0057032
AssemblyInfo   00:00:00.1127332
Restore        00:00:22.4571167
Build          00:01:03.5961564
Publish        00:00:12.8017990
Test           00:00:50.2630232
Default        00:00:00.0003009
Pack           00:01:29.3428302
Total:         00:03:59.1215607
Status:        Ok
---------------------------------------------------------------------
Performance:
 - Cli parsing: 826 milliseconds
 - Packages: 36 seconds
   - Disk IO: 15 seconds
   - Average Download Time: 106 milliseconds
   - Number of downloads: 166
   - Average Request Time: 92 milliseconds
   - Number of Requests: 167
   - Creating Runtime Graph: 511 milliseconds
   - Retrieve Assembly List: 16 seconds
 - Script compiling: 20 seconds
 - Script analyzing: 107 milliseconds
 - Script running: 4 minutes
 - Script cleanup: 142 milliseconds
 - Runtime: 5 minutes, 21 seconds

@rdipardo
Copy link
Contributor Author

Obsoleted by 9102720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants