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

Microsoft.NET.ILLink.Tasks in .NET 8 does not target .NET 8 #82241

Closed
rolfbjarne opened this issue Feb 16, 2023 · 19 comments
Closed

Microsoft.NET.ILLink.Tasks in .NET 8 does not target .NET 8 #82241

rolfbjarne opened this issue Feb 16, 2023 · 19 comments
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Milestone

Comments

@rolfbjarne
Copy link
Member

Description

The Microsoft.NET.ILLink.Tasks NuGet in .NET 8 preview 1 does not target .NET 8, causing problems for custom linker steps when they are built with .NET 8.

Reproduction Steps

Follow the instructions here: https://gist.github.com/jonathanpeppers/99961b4639823206c2537c03c856b097, except:

  1. Install a later version of the .NET 8 preview 1
  2. Make sure .NET 7 is installed too.

Create a new maui project and try to build it:

$ dotnet new maui
$ dotnet build -f net8.0-ios

Expected behavior

Successful build.

Actual behavior

Build failure:

Fatal error in IL Linker

  Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

   ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.   File name: 'System.Collections, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

     at MonoTouch.Tuner.CoreTypeMapStep..ctor()

     at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)

     --- End of inner exception stack trace ---

     at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)

     at Mono.Linker.Driver.AddCustomStep(Pipeline pipeline, String arg)

     at Mono.Linker.Driver.SetupContext(ILogger customLogger)

     at Mono.Linker.Driver.Run(ILogger customLogger)

     at Mono.Linker.Driver.Main(String[] args)

/Users/dmo/.nuget/packages/microsoft.net.illink.tasks/8.0.100-1.23067.1/build/Microsoft.NET.ILLink.targets(133,5): error MSB6006: "dotnet" exited with code 134. [/Users/dmo/work/CrazyEights/CrazyEights.csproj::TargetFramework=net8.0-ios]

/Users/dmo/.nuget/packages/microsoft.net.illink.tasks/8.0.100-1.23067.1/build/Microsoft.NET.ILLink.targets(86,5): error NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false. [/Users/dmo/work/CrazyEights/CrazyEights.csproj::TargetFramework=net8.0-ios]

Regression?

Yes

Known Workarounds

Remove .NET 7.

Configuration

.NET 8.0.100-preview.1.23115.2

Other information

It's because this NuGet: https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet8/NuGet/Microsoft.NET.ILLink.Tasks/versions/8.0.100-1.23067.1 is built for .NET 7:

$ unzip -l /Users/rolf/Downloads/microsoft.net.illink.tasks.8.0.100-1.23067.1.nupkg
Archive:  /Users/rolf/Downloads/microsoft.net.illink.tasks.8.0.100-1.23067.1.nupkg
  Length      Date    Time    Name
---------  ---------- -----   ----
      520  01-17-2023 18:35   _rels/.rels
      977  01-17-2023 18:35   Microsoft.NET.ILLink.Tasks.nuspec
    39872  01-17-2023 18:35   tools/net472/ILLink.Tasks.dll
   421328  01-17-2023 18:34   tools/net472/Mono.Cecil.dll
    20856  02-19-2020 10:05   tools/net472/System.Buffers.dll
   189312  10-19-2020 18:37   tools/net472/System.Collections.Immutable.dll
   141184  02-19-2020 10:05   tools/net472/System.Memory.dll
   115856  05-15-2018 13:29   tools/net472/System.Numerics.Vectors.dll
   462728  10-19-2020 18:45   tools/net472/System.Reflection.Metadata.dll
    16768  10-19-2020 18:46   tools/net472/System.Runtime.CompilerServices.Unsafe.dll
   721296  01-17-2023 18:35   tools/net7.0/illink.dll
    40376  01-17-2023 18:35   tools/net7.0/ILLink.Tasks.dll
   421328  01-17-2023 18:34   tools/net7.0/Mono.Cecil.dll
   103888  01-17-2023 18:35   tools/net7.0/Mono.Cecil.Pdb.dll
     6822  01-17-2023 18:35   tools/net7.0/illink.deps.json
      324  01-17-2023 18:35   tools/net7.0/illink.runtimeconfig.json
    24890  01-17-2023 18:35   tools/net7.0/ILLink.Tasks.deps.json
      783  01-17-2023 18:33   Sdk/Sdk.props
     1451  01-17-2023 18:33   build/Microsoft.NET.ILLink.Tasks.props
    21256  01-17-2023 18:33   build/Microsoft.NET.ILLink.targets
    10806  01-17-2023 18:33   build/6.0_suppressions.xml
     7006  12-30-2022 18:15   Icon.png
      787  01-17-2023 18:35   [Content_Types].xml
      664  01-17-2023 18:35   package/services/metadata/core-properties/c7cfde231f344fc9b00bdaf0b59aea91.psmdcp
    11403  01-17-2023 10:38   .signature.p7s
---------                     -------
  2782481                     25 files

and our custom linker steps are built using .NET 8, thus things go wrong when the .NET 7 version of illink.dll (running on .NET 7) tries to load the custom linker steps built with .NET 8 (and this is also why having .NET 7 installed is required to reproduce the problem: if .NET 7 is not installed, illink.dll will be executed with .NET 8, and everything works).

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Feb 16, 2023
@ghost
Copy link

ghost commented Feb 16, 2023

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

The Microsoft.NET.ILLink.Tasks NuGet in .NET 8 preview 1 does not target .NET 8, causing problems for custom linker steps when they are built with .NET 8.

Reproduction Steps

Follow the instructions here: https://gist.github.com/jonathanpeppers/99961b4639823206c2537c03c856b097, except:

  1. Install a later version of the .NET 8 preview 1
  2. Make sure .NET 7 is installed too.

Create a new maui project and try to build it:

$ dotnet new maui
$ dotnet build -f net8.0-ios

Expected behavior

Successful build.

Actual behavior

Build failure:

Fatal error in IL Linker

  Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

   ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.   File name: 'System.Collections, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

     at MonoTouch.Tuner.CoreTypeMapStep..ctor()

     at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)

     --- End of inner exception stack trace ---

     at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)

     at Mono.Linker.Driver.AddCustomStep(Pipeline pipeline, String arg)

     at Mono.Linker.Driver.SetupContext(ILogger customLogger)

     at Mono.Linker.Driver.Run(ILogger customLogger)

     at Mono.Linker.Driver.Main(String[] args)

/Users/dmo/.nuget/packages/microsoft.net.illink.tasks/8.0.100-1.23067.1/build/Microsoft.NET.ILLink.targets(133,5): error MSB6006: "dotnet" exited with code 134. [/Users/dmo/work/CrazyEights/CrazyEights.csproj::TargetFramework=net8.0-ios]

/Users/dmo/.nuget/packages/microsoft.net.illink.tasks/8.0.100-1.23067.1/build/Microsoft.NET.ILLink.targets(86,5): error NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false. [/Users/dmo/work/CrazyEights/CrazyEights.csproj::TargetFramework=net8.0-ios]

Regression?

Yes

Known Workarounds

Remove .NET 7.

Configuration

.NET 8.0.100-preview.1.23115.2

Other information

It's because this NuGet: https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet8/NuGet/Microsoft.NET.ILLink.Tasks/versions/8.0.100-1.23067.1 is built for .NET 7:

$ unzip -l /Users/rolf/Downloads/microsoft.net.illink.tasks.8.0.100-1.23067.1.nupkg
Archive:  /Users/rolf/Downloads/microsoft.net.illink.tasks.8.0.100-1.23067.1.nupkg
  Length      Date    Time    Name
---------  ---------- -----   ----
      520  01-17-2023 18:35   _rels/.rels
      977  01-17-2023 18:35   Microsoft.NET.ILLink.Tasks.nuspec
    39872  01-17-2023 18:35   tools/net472/ILLink.Tasks.dll
   421328  01-17-2023 18:34   tools/net472/Mono.Cecil.dll
    20856  02-19-2020 10:05   tools/net472/System.Buffers.dll
   189312  10-19-2020 18:37   tools/net472/System.Collections.Immutable.dll
   141184  02-19-2020 10:05   tools/net472/System.Memory.dll
   115856  05-15-2018 13:29   tools/net472/System.Numerics.Vectors.dll
   462728  10-19-2020 18:45   tools/net472/System.Reflection.Metadata.dll
    16768  10-19-2020 18:46   tools/net472/System.Runtime.CompilerServices.Unsafe.dll
   721296  01-17-2023 18:35   tools/net7.0/illink.dll
    40376  01-17-2023 18:35   tools/net7.0/ILLink.Tasks.dll
   421328  01-17-2023 18:34   tools/net7.0/Mono.Cecil.dll
   103888  01-17-2023 18:35   tools/net7.0/Mono.Cecil.Pdb.dll
     6822  01-17-2023 18:35   tools/net7.0/illink.deps.json
      324  01-17-2023 18:35   tools/net7.0/illink.runtimeconfig.json
    24890  01-17-2023 18:35   tools/net7.0/ILLink.Tasks.deps.json
      783  01-17-2023 18:33   Sdk/Sdk.props
     1451  01-17-2023 18:33   build/Microsoft.NET.ILLink.Tasks.props
    21256  01-17-2023 18:33   build/Microsoft.NET.ILLink.targets
    10806  01-17-2023 18:33   build/6.0_suppressions.xml
     7006  12-30-2022 18:15   Icon.png
      787  01-17-2023 18:35   [Content_Types].xml
      664  01-17-2023 18:35   package/services/metadata/core-properties/c7cfde231f344fc9b00bdaf0b59aea91.psmdcp
    11403  01-17-2023 10:38   .signature.p7s
---------                     -------
  2782481                     25 files

and our custom linker steps are built using .NET 8, thus things go wrong when the .NET 7 version of illink.dll (running on .NET 7) tries to load the custom linker steps built with .NET 8 (and this is also why having .NET 7 installed is required to reproduce the problem: if .NET 7 is not installed, illink.dll will be executed with .NET 8, and everything works).

Author: rolfbjarne
Assignees: -
Labels:

area-AssemblyLoader-coreclr

Milestone: -

@rolfbjarne
Copy link
Member Author

CC @marek-safar @sbomer

@marek-safar
Copy link
Contributor

@rolfbjarne does it block P1 for you?

@marek-safar marek-safar added area-Tools-ILLink .NET linker development as well as trimming analyzers and removed area-AssemblyLoader-coreclr untriaged New issue has not been triaged by the area owner labels Feb 16, 2023
@marek-safar marek-safar added this to the 8.0.0 milestone Feb 16, 2023
@ghost
Copy link

ghost commented Feb 16, 2023

Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

The Microsoft.NET.ILLink.Tasks NuGet in .NET 8 preview 1 does not target .NET 8, causing problems for custom linker steps when they are built with .NET 8.

Reproduction Steps

Follow the instructions here: https://gist.github.com/jonathanpeppers/99961b4639823206c2537c03c856b097, except:

  1. Install a later version of the .NET 8 preview 1
  2. Make sure .NET 7 is installed too.

Create a new maui project and try to build it:

$ dotnet new maui
$ dotnet build -f net8.0-ios

Expected behavior

Successful build.

Actual behavior

Build failure:

Fatal error in IL Linker

  Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

   ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Collections, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.   File name: 'System.Collections, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

     at MonoTouch.Tuner.CoreTypeMapStep..ctor()

     at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)

     --- End of inner exception stack trace ---

     at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)

     at Mono.Linker.Driver.AddCustomStep(Pipeline pipeline, String arg)

     at Mono.Linker.Driver.SetupContext(ILogger customLogger)

     at Mono.Linker.Driver.Run(ILogger customLogger)

     at Mono.Linker.Driver.Main(String[] args)

/Users/dmo/.nuget/packages/microsoft.net.illink.tasks/8.0.100-1.23067.1/build/Microsoft.NET.ILLink.targets(133,5): error MSB6006: "dotnet" exited with code 134. [/Users/dmo/work/CrazyEights/CrazyEights.csproj::TargetFramework=net8.0-ios]

/Users/dmo/.nuget/packages/microsoft.net.illink.tasks/8.0.100-1.23067.1/build/Microsoft.NET.ILLink.targets(86,5): error NETSDK1144: Optimizing assemblies for size failed. Optimization can be disabled by setting the PublishTrimmed property to false. [/Users/dmo/work/CrazyEights/CrazyEights.csproj::TargetFramework=net8.0-ios]

Regression?

Yes

Known Workarounds

Remove .NET 7.

Configuration

.NET 8.0.100-preview.1.23115.2

Other information

It's because this NuGet: https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet8/NuGet/Microsoft.NET.ILLink.Tasks/versions/8.0.100-1.23067.1 is built for .NET 7:

$ unzip -l /Users/rolf/Downloads/microsoft.net.illink.tasks.8.0.100-1.23067.1.nupkg
Archive:  /Users/rolf/Downloads/microsoft.net.illink.tasks.8.0.100-1.23067.1.nupkg
  Length      Date    Time    Name
---------  ---------- -----   ----
      520  01-17-2023 18:35   _rels/.rels
      977  01-17-2023 18:35   Microsoft.NET.ILLink.Tasks.nuspec
    39872  01-17-2023 18:35   tools/net472/ILLink.Tasks.dll
   421328  01-17-2023 18:34   tools/net472/Mono.Cecil.dll
    20856  02-19-2020 10:05   tools/net472/System.Buffers.dll
   189312  10-19-2020 18:37   tools/net472/System.Collections.Immutable.dll
   141184  02-19-2020 10:05   tools/net472/System.Memory.dll
   115856  05-15-2018 13:29   tools/net472/System.Numerics.Vectors.dll
   462728  10-19-2020 18:45   tools/net472/System.Reflection.Metadata.dll
    16768  10-19-2020 18:46   tools/net472/System.Runtime.CompilerServices.Unsafe.dll
   721296  01-17-2023 18:35   tools/net7.0/illink.dll
    40376  01-17-2023 18:35   tools/net7.0/ILLink.Tasks.dll
   421328  01-17-2023 18:34   tools/net7.0/Mono.Cecil.dll
   103888  01-17-2023 18:35   tools/net7.0/Mono.Cecil.Pdb.dll
     6822  01-17-2023 18:35   tools/net7.0/illink.deps.json
      324  01-17-2023 18:35   tools/net7.0/illink.runtimeconfig.json
    24890  01-17-2023 18:35   tools/net7.0/ILLink.Tasks.deps.json
      783  01-17-2023 18:33   Sdk/Sdk.props
     1451  01-17-2023 18:33   build/Microsoft.NET.ILLink.Tasks.props
    21256  01-17-2023 18:33   build/Microsoft.NET.ILLink.targets
    10806  01-17-2023 18:33   build/6.0_suppressions.xml
     7006  12-30-2022 18:15   Icon.png
      787  01-17-2023 18:35   [Content_Types].xml
      664  01-17-2023 18:35   package/services/metadata/core-properties/c7cfde231f344fc9b00bdaf0b59aea91.psmdcp
    11403  01-17-2023 10:38   .signature.p7s
---------                     -------
  2782481                     25 files

and our custom linker steps are built using .NET 8, thus things go wrong when the .NET 7 version of illink.dll (running on .NET 7) tries to load the custom linker steps built with .NET 8 (and this is also why having .NET 7 installed is required to reproduce the problem: if .NET 7 is not installed, illink.dll will be executed with .NET 8, and everything works).

Author: rolfbjarne
Assignees: -
Labels:

area-Tools-ILLink

Milestone: -

@rolfbjarne
Copy link
Member Author

@marek-safar we might have a workaround: dotnet/macios#17560

@sbomer
Copy link
Member

sbomer commented Feb 16, 2023

This should also be fixed when updating to an SDK with dotnet/installer#15484 (although I understand that may be blocked as in dotnet/macios#17518). The 8.0.100-* packages built from dotnet/linker weren't updated to target net8, while the 8.0.0-preview* ones built from dotnet/runtime do target net8.

@agocke
Copy link
Member

agocke commented Feb 16, 2023

That fix wasn't in Preview 1, so you'll have to work around this for Preview 1.

jonathanpeppers added a commit to jonathanpeppers/xamarin-android that referenced this issue Feb 16, 2023
Context: dotnet/macios#17560
Context: dotnet/runtime#82241

On macOS, if you have both .NET 7 and .NET 8 Preview 1 installed, and
you do:

* `dotnet new android`

* `dotnet build -c Release`

You get a build error:

    Fatal error in IL Linker
    Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
    ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
    File name: 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
        at Microsoft.Android.Sdk.ILLink.PreserveSubStepDispatcher..ctor()
        at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
        --- End of inner exception stack trace ---
        at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
        at Mono.Linker.Driver.AddCustomStep(Pipeline pipeline, String arg)
        at Mono.Linker.Driver.SetupContext(ILogger customLogger)
        at Mono.Linker.Driver.Run(ILogger customLogger)
        at Mono.Linker.Driver.Main(String[] args)

This happens because the linker is actually trying to run against the
.NET 7 runtime! It promptly blows up against `net8.0` linker steps.

Trying the same workaround as xamarin-macios, to build our linker steps
for `net7.0`
rolfbjarne added a commit to dotnet/macios that referenced this issue Feb 17, 2023
…work around the fact that the linker is still a .NET 7 app. (#17560)

Hopefully works around dotnet/runtime#82241.
jonpryor pushed a commit to dotnet/android that referenced this issue Feb 17, 2023
Context: dotnet/macios#17560
Context: dotnet/runtime#82241

On macOS, if you have both .NET 7 and .NET 8 Preview 1 installed, and
you do:

	dotnet new android
	dotnet build -c Release

You get a build error:

	Fatal error in IL Linker
	Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
	---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
	File name: 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
	    at Microsoft.Android.Sdk.ILLink.PreserveSubStepDispatcher..ctor()
	    at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
	    --- End of inner exception stack trace ---
	    at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
	    at Mono.Linker.Driver.AddCustomStep(Pipeline pipeline, String arg)
	    at Mono.Linker.Driver.SetupContext(ILogger customLogger)
	    at Mono.Linker.Driver.Run(ILogger customLogger)
	    at Mono.Linker.Driver.Main(String[] args)

This happens because the .NET 8 linker is actually trying to run
against the .NET 7 runtime!  It promptly blows up against `net8.0`
linker steps.

Trying [the same workaround as xamarin-macios][0], to build our
linker steps for `net7.0`.

[0]: dotnet/macios@c61e327
jonathanpeppers added a commit to dotnet/android that referenced this issue Feb 17, 2023
Context: dotnet/macios#17560
Context: dotnet/runtime#82241

On macOS, if you have both .NET 7 and .NET 8 Preview 1 installed, and
you do:

	dotnet new android
	dotnet build -c Release

You get a build error:

	Fatal error in IL Linker
	Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
	---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
	File name: 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
	    at Microsoft.Android.Sdk.ILLink.PreserveSubStepDispatcher..ctor()
	    at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
	    --- End of inner exception stack trace ---
	    at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
	    at Mono.Linker.Driver.AddCustomStep(Pipeline pipeline, String arg)
	    at Mono.Linker.Driver.SetupContext(ILogger customLogger)
	    at Mono.Linker.Driver.Run(ILogger customLogger)
	    at Mono.Linker.Driver.Main(String[] args)

This happens because the .NET 8 linker is actually trying to run
against the .NET 7 runtime!  It promptly blows up against `net8.0`
linker steps.

Trying [the same workaround as xamarin-macios][0], to build our
linker steps for `net7.0`.

[0]: dotnet/macios@c61e327
@EgorBo
Copy link
Member

EgorBo commented Feb 21, 2023

um.. after clearing my local nuget cache via dotnet nuget locals all --clear I can't even build a simple NativeAOT hello world with public .NET 8.0 Preview1:

mkdir eee
cd eee
dotnet new console
dotnet publish -c Release -r win-x64 /p:PublishAot=true /p:StripSymbols=true
MSBuild version 17.6.0-preview-23108-10+51df47643 for .NET
  Determining projects to restore...
C:\prj\eee\eee.csproj : error NU1101: Unable to find package Microsoft.NET.ILLink.Tasks. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org
  Failed to restore C:\prj\eee\eee.csproj (in 5.77 sec).

cc @agocke @MichalStrehovsky

@agocke
Copy link
Member

agocke commented Feb 21, 2023

@EgorBo Did you add the .NET 8 package source as specified in https://github.com/dotnet/installer#installers-and-binaries?

@EgorBo
Copy link
Member

EgorBo commented Feb 21, 2023

@EgorBo Did you add the .NET 8 package source as specified in https://github.com/dotnet/installer#installers-and-binaries?

I thought those are only for daily bits, public previews used to work fine without it, didn't they?

@agocke
Copy link
Member

agocke commented Feb 21, 2023

Oh, nvm, I see Preview 1 was just officially released. I think it takes a bit for packages to flow to public servers. Last time I checked it took a few hours at least.

@agocke
Copy link
Member

agocke commented Feb 21, 2023

That said, not a bad idea to confirm that the packages are set for release. @mmitche any way to verify that the runtime packs are going to published to NuGet?

@JeepNL
Copy link

JeepNL commented Feb 21, 2023

I'm getting this error in Microsoft Visual Studio Community 2022 (64-bit) - Version 17.6.0 Preview 1.0 with a Blazor WASM project. 7.x is installed too.

Severity Code Description Project File Line Suppression State
Error NU1101 Unable to find package Microsoft.NET.ILLink.Tasks. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages, nuget.org Client.Tusk C:\X\Repos\Tusk\ClientTusk\Client.Tusk.csproj 1

.csproj

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0-preview.1.23112.2" />
    <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0-preview.1.23112.2" PrivateAssets="all" />
  </ItemGroup>

[UPDATE]

Visual Studio Nuget Screenshot
Screenshot 2023-02-21 230817

@sbomer
Copy link
Member

sbomer commented Feb 21, 2023

I think this is specific to the linker packages, not all of the runtime packs. I see for example that the preview1 netcoreapp package was published: https://www.nuget.org/packages/Microsoft.NETCore.App.Runtime.linux-x64/8.0.0-preview.1.23110.8#versions-body-tab. We need the following versions of Microsoft.NET.ILLink.Tasks to be published:

  1. latest 7.0 package (currently 7.0.100-1.23062.2)
  2. last 8.0 package taken from dotnet/linker (8.0.100-1.23067.1)
  3. future 7.0 packages from dotnet/linker
  4. future 8.0 packages from dotnet/runtime

I suspect that 1-3 are not getting published because they are built out of the dotnet/linker repo (but I hope 4 will "just work" since that should be no different than the other runtime packs).

@agocke
Copy link
Member

agocke commented Feb 21, 2023

It looks like the package was missing for arbitrary reasons -- we're uploading it now.

@agocke
Copy link
Member

agocke commented Feb 21, 2023

Package should be uploaded now, this should hopefully be fixed.

@KeterSCP
Copy link

I can confirm that error is gone and build/publish works fine now

@JeepNL
Copy link

JeepNL commented Feb 21, 2023

Yep, it works with Visual Studio 17.6.0 Preview 1.0 and my Blazor WASM project too.

@agocke
Copy link
Member

agocke commented Feb 22, 2023

Closing as this should be resolved in main

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Projects
None yet
Development

No branches or pull requests

7 participants