Skip to content

.NET 8 preview 7's illink runs with preview 6 if preview 6 is installed #90015

Closed
@rolfbjarne

Description

@rolfbjarne

Description

As description: .NET 8 preview 7's illink runs with preview 6 if preview 6 is installed

Reproduction Steps

Install preview 6 and preview 7:

Run illink.dll manually:

/usr/local/share/dotnet/dotnet ~/.nuget/packages/microsoft.net.illink.tasks/8.0.0-preview.7.23375.6/tools/net8.0/illink.dll --help

illink.dll is now executed with preview 6, even if preview 7 is the current .NET:

$ dotnet --version
8.0.100-preview.7.23376.3

The simplest way I found to actually determine which .NET version is loaded is to use dotnet-trace to collect a trace and look at the loaded assemblies (the original test case is to create an iOS project, build it, and have illink.dll crash with an inexplicable exception):

dotnet-trace collect --providers Microsoft-Windows-DotNETRuntime:4 -- /usr/local/share/dotnet/dotnet ~/.nuget/packages/microsoft.net.illink.tasks/8.0.0-preview.7.23375.6/tools/net8.0/illink.dll --help

Example result:

dotnet_20230804_141326.nettrace.zip

Screenshot for the curious:

Screenshot 2023-08-04 at 14 21 18

Expected behavior

illink.dll executes with .NET 8 preview 7.

Actual behavior

illink.dll executes with .NET 8 preview 6.

Regression?

Yes.

Known Workarounds

Remove preview 6.

Deleting the following directory seems to be enough:

/usr/local/share/dotnet/shared/Microsoft.NETCore.App/8.0.0-preview.6.23329.7

I also tried forcing the exact version in a global.json:

{
  "sdk": {
    "version": "8.0.100-preview.7.23376.3",
    "rollforward": "disable"
  }
}

That did not work.

Configuration

$ $ dotnet --info
.NET SDK:
 Version:   8.0.100-preview.7.23376.3
 Commit:    daebeea8ea

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  13.5
 OS Platform: Darwin
 RID:         osx.13-x64
 Base Path:   /usr/local/share/dotnet/sdk/8.0.100-preview.7.23376.3/

.NET workloads installed:
 [macos]
   Installation Source: SDK 8.0.100-preview.7
   Manifest Version:    13.3.8694-net8-p7/8.0.100-preview.7
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100-preview.7/microsoft.net.sdk.macos/WorkloadManifest.json
   Install Type:        FileBased

 [ios]
   Installation Source: SDK 8.0.100-preview.7
   Manifest Version:    16.4.8694-net8-p7/8.0.100-preview.7
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100-preview.7/microsoft.net.sdk.ios/WorkloadManifest.json
   Install Type:        FileBased

 [maccatalyst]
   Installation Source: SDK 8.0.100-preview.7
   Manifest Version:    16.4.8694-net8-p7/8.0.100-preview.7
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100-preview.7/microsoft.net.sdk.maccatalyst/WorkloadManifest.json
   Install Type:        FileBased

 [maui]
   Installation Source: SDK 8.0.100-preview.7
   Manifest Version:    8.0.0-preview.7.8842/8.0.100-preview.7
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100-preview.7/microsoft.net.sdk.maui/WorkloadManifest.json
   Install Type:        FileBased

 [tvos]
   Installation Source: SDK 8.0.100-preview.7
   Manifest Version:    16.4.8694-net8-p7/8.0.100-preview.7
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100-preview.7/microsoft.net.sdk.tvos/WorkloadManifest.json
   Install Type:        FileBased

 [android]
   Installation Source: SDK 8.0.100-preview.7
   Manifest Version:    34.0.0-preview.7.382/8.0.100-preview.7
   Manifest Path:       /usr/local/share/dotnet/sdk-manifests/8.0.100-preview.7/microsoft.net.sdk.android/WorkloadManifest.json
   Install Type:        FileBased


Host:
  Version:      8.0.0-preview.7.23375.6
  Architecture: x64
  Commit:       65b696cf5e
  RID:          osx-x64

.NET SDKs installed:
  8.0.100-preview.6.23330.14 [/usr/local/share/dotnet/sdk]
  8.0.100-preview.7.23376.3 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.0-preview.6.23329.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0-preview.7.23375.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.0-preview.6.23329.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0-preview.7.23375.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions