Runtime version mismatch with nuget.org on .NET 8 RC2

Bug #2040547 reported by Mateus Rodrigues de Morais
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dotnet8 (Ubuntu)
Fix Released
Undecided
Mateus Rodrigues de Morais
Mantic
Fix Released
Undecided
Mateus Rodrigues de Morais
Noble
Fix Released
Undecided
Mateus Rodrigues de Morais

Bug Description

[ Impact ]

 * Users are currently unable to run RID-specific dotnet operations on a .NET
   project, e.g. `dotnet build -r linux-x64`.

 * Since this is a critical bug that could affect real-world scenarios of
   building and publishing RID-specific applications, the fix is being
   backported to Mantic.

 * The upload includes a patch that was suggested by Microsoft [1] and fixes
   the issue by updating the VMR source-built runtime version to the same one
   Microsoft publishes, to prevent the .NET CLI tools from trying to download
   a linux-x64 runtime package that does not exist.

[ Test Plan ]

 * To reproduce the bug, one must install dotnet-sdk-8.0 version
   8.0.100~rc2-0ubuntu1 and run:

   ```
   $ dotnet new console -o Test
   $ cd Test
   $ dotnet build # should work
   $ dotnet build -r linux-x64 # should not work
   ```

 * Version 8.0.100~rc2-0ubuntu2 (in PPA [2]) should have the last
   command working.

[ Where problems could occur ]

 * The patch effectively only changes the version string of the resulting .NET
   source-built runtime. No feature or behavior-related code changes are made.

 * A regression can occur if a third-party software depends on the specific
   version string of the runtime present in 8.0.0~rc2-0ubuntu1.

 * This is highly unlikely as the vast majority of .NET software targets a
   major .NET version, and the diff between both versions is in the build
   section of the version string: 8.0.0-rc.2.23479.6 (new) vs
   8.0.0-rc.2.23475.17 (old).

[1] https://github.com/dotnet/source-build/issues/3673#issuecomment-1779566707
[2] https://launchpad.net/~mateus-morais/+archive/ubuntu/dotnet8-rc2-runtime-version-fix

Related branches

summary: - Runtime version mismatch with nuget.org on RC2
+ Runtime version mismatch with nuget.org on .NET 8 RC2
tags: added: foundations-todo
Revision history for this message
Mateus Rodrigues de Morais (mateus-morais) wrote (last edit ):

The version in PPA [0] with a patch [1] included to fix the error seems to work as expected:

```
$ dotnet publish -r linux-x64
MSBuild version 17.8.0+6cdef4241 for .NET
  Determining projects to restore...
  Restored /root/PackageTest/PackageTest.csproj (in 3.16 sec).
/usr/lib/dotnet/sdk/8.0.100-rc.2.23502.1/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.RuntimeIdentifierInference.targets(311,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [/root/PackageTest/PackageTest.csproj]
  PackageTest -> /root/PackageTest/bin/Release/net8.0/linux-x64/PackageTest.dll
  PackageTest -> /root/PackageTest/bin/Release/net8.0/linux-x64/publish/
```

[0] https://launchpad.net/~mateus-morais/+archive/ubuntu/dotnet8-rc2-runtime-version-fix
[1] https://github.com/dotnet/source-build/issues/3673#issuecomment-1779566707

Changed in dotnet8 (Ubuntu):
status: New → In Progress
description: updated
Changed in dotnet8 (Ubuntu Mantic):
assignee: nobody → Mateus Rodrigues de Morais (mateus-morais)
status: New → In Progress
description: updated
description: updated
Graham Inggs (ginggs)
Changed in dotnet8 (Ubuntu Mantic):
status: In Progress → Fix Committed
Changed in dotnet8 (Ubuntu Noble):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dotnet8 - 8.0.100-8.0.0~rc2-0ubuntu2

---------------
dotnet8 (8.0.100-8.0.0~rc2-0ubuntu2) noble; urgency=medium

  * d/p/0001-Fix-source-built-runtime-version-number.patch: Fix
    source-built runtime version number. (LP: #2040547)

 -- Mateus Rodrigues de Morais <email address hidden> Thu, 26 Oct 2023 08:52:11 -0300

Changed in dotnet8 (Ubuntu Noble):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Proposed package upload rejected

An upload of dotnet8 to mantic-proposed has been rejected from the upload queue for the following reason: "mantic has 8.0.100-8.0.0-0ubuntu1~23.10.1 which is >> 8.0.100-8.0.0~rc2-0ubuntu2~23.10.1".

Revision history for this message
Mateus Rodrigues de Morais (mateus-morais) wrote (last edit ):

The fix for this issue on Mantic was released as part of dotnet8 8.0.100-8.0.0-0ubuntu1~23.10.1 (GA release)

Changed in dotnet8 (Ubuntu Mantic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.