dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.73k stars 1.07k forks source link

When compiling the dotnet/sdk project the ASPNetCore version doesn't match the cloned code #28663

Open koko17 opened 2 years ago

koko17 commented 2 years ago

Hello,

I'm new to dotnot compilation so I apologize if I have done something totally wrong or missed a simple step.

When compiling the dotnet\sdk project on Linux (Ubunto 22) the output version of Microsoft.AspNetCore.App is not correct.

To reproduce the problem, please follow these simple steps:

  1. Clone branch 6.0.402 which includes .NET Runtime 6.0.10, ASP.NET Core Runtime 6.0.10 and .NET Desktop Runtime 6.0.10 git clone --recursive --branch v6.0.402 https://github.com/dotnet/sdk.git cd sdk

  2. Compile Release version (problem is the same also with the Debug version) ./build.sh -configuration Release

  3. Inspect the output directory sdk/artifacts/bin/redist/Release/dotnet The /shared/Microsoft.NETCore.App subdirectory contains the following subdirectories: 2.1.0 2.2.8 3.1.0 5.0.0 6.0.10 6.0.3 The shared/Microsoft.AspNetCore.App subdirectory contains only the subdirectory: 6.0.3

I expected to find version 6.0.10 also in the shared/Microsoft.AspNetCore.App. Am I missing something ?

Any help/answer will be appreciated.

Thanks Moshe

joeloff commented 2 years ago

Hi

That's because the SDK is actually built with the 6.0.201 SDK (see https://github.com/dotnet/sdk/blob/release/6.0.4xx/global.json).

The runtimes that ship with a given SDK are actually pulled into the installer repo. When the SDK repo is built, it only produces the CLI, but it does so using an existing copy of the full SDK redistributable that includes the .NET runtime components.