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

Source-build should also use the release runtime. #46299

Closed
wants to merge 2 commits into from

Conversation

crummel
Copy link

@crummel crummel commented Jan 27, 2023

This is attempting to fix dotnet/source-build#3146. Source-build produces a stabilized runtime version which should filter down into ASP.NET and other repos. In #43937 we made changes in ASP.NET to support using only the non-portable (i.e. RID-specific) version of this runtime but this doesn't appear to have worked for the projects in src/Tools:

  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj : error NU1102: Unable to find package Microsoft.NETCore.App.Host.centos.8-x64 with version (= 7.0.2-servicing.22606.5) [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj : error NU1102:   - Found 1 version(s) in source-built [ Nearest version: 7.0.2 ] [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj : error NU1102:   - Found 1 version(s) in previously-source-built [ Nearest version: 7.0.2 ] [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj : error NU1102:   - Found 0 version(s) in prebuilt [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-secrets/src/dotnet-user-secrets.csproj : error NU1102:   - Found 0 version(s) in reference-packages [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-jwts/src/dotnet-user-jwts.csproj : error NU1102: Unable to find package Microsoft.NETCore.App.Host.centos.8-x64 with version (= 7.0.2-servicing.22606.5) [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-jwts/src/dotnet-user-jwts.csproj : error NU1102:   - Found 1 version(s) in source-built [ Nearest version: 7.0.2 ] [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-jwts/src/dotnet-user-jwts.csproj : error NU1102:   - Found 1 version(s) in previously-source-built [ Nearest version: 7.0.2 ] [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-jwts/src/dotnet-user-jwts.csproj : error NU1102:   - Found 0 version(s) in prebuilt [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-user-jwts/src/dotnet-user-jwts.csproj : error NU1102:   - Found 0 version(s) in reference-packages [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj : error NU1102: Unable to find package Microsoft.NETCore.App.Host.centos.8-x64 with version (= 7.0.2-servicing.22606.5) [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj : error NU1102:   - Found 1 version(s) in source-built [ Nearest version: 7.0.2 ] [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj : error NU1102:   - Found 1 version(s) in previously-source-built [ Nearest version: 7.0.2 ] [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj : error NU1102:   - Found 0 version(s) in prebuilt [/src/.dotnet/sdk/7.0.102/NuGet.targets]
  /src/src/aspnetcore/artifacts/source-build/self/src/src/Tools/dotnet-dev-certs/src/dotnet-dev-certs.csproj : error NU1102:   - Found 0 version(s) in reference-packages [/src/.dotnet/sdk/7.0.102/NuGet.targets]

I wanted to open this as a draft to get any advice and also to make sure that I don't break the non-source-build ASP.NET with my source-build fix.

@ghost ghost added the area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI label Jan 27, 2023
@ghost ghost added this to the 7.0.x milestone Jan 27, 2023
@ghost
Copy link

ghost commented Jan 27, 2023

Hi @crummel. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@crummel crummel marked this pull request as ready for review January 31, 2023 00:03
Copy link
Member

@dougbu dougbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the opposite of what you want; lines in the project files will "lose" to those in the src/Tools/Directory.Build.targets file. Please remove the $(TargetLatestDotNetRuntime) setting from src/Tools/Directory.Build.targets and add it to the other projects under src/Tools/ (not these three).

Our default for all projects in the repo is $(TargetLatestDotNetRuntime) == true. It's just tool projects that ship independently of the SDK we need to special case. Note most (all❔) of those projects aren't source-built and won't need the $(DotNetSourceBuild) part of the condition. (Side note: you have a typo in that part of the condition.)

@dsplaisted or @marcpopMSFT please confirm I'm correct that tools packaged only for inclusion in the SDK should align their dependencies w/ everything else in the SDK.

@marcpopMSFT
Copy link
Member

@dsplaisted or @marcpopMSFT please confirm I'm correct that tools packaged only for inclusion in the SDK should align their dependencies w/ everything else in the SDK.
Not quite sure what you mean here as I don't really get what the PR is trying to do. Ya'll target a specific version of each runtime? The installer repo will rewrite all of the runtimeconfig.json files anyway.

@dougbu
Copy link
Member

dougbu commented Jan 31, 2023

@marcpopMSFT I was less worried about the runtime configuration than *.deps.json files. But your comment at least confirms this change (once it's reversed to make the dotnet-dev-certs project use the latest runtime unconditionally) won't hurt our tools or the SDK.

@crummel
Copy link
Author

crummel commented Feb 3, 2023

I found a way to do this in source-build without the ASP.NET patch, sorry for the noise and thanks for taking a look.

@crummel crummel closed this Feb 3, 2023
@ghost
Copy link

ghost commented Feb 3, 2023

Hi @crummel. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@dougbu dougbu removed this from the 7.0.x milestone Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-commandlinetools Includes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants