Repository navigation
Reference Microsoft.NETCore.App in repos which are downstream of runtime - #5187
Conversation
There was a problem hiding this comment.
Pull request overview
Updates several VMR downstream repos to compile against the “live” Microsoft.NETCore.App.Ref targeting pack during source-build, aligning their framework reference pack resolution with the runtime being built in the VMR.
Changes:
- Add
Microsoft.NETCore.App.Refas a dependency (and flow its version viaMicrosoftNETCoreAppRefPackageVersion) in multiple downstream repos. - In source-build (
DotNetBuildSourceOnly=true), set Arcade “Known*” targeting pack properties to point atMicrosoftNETCore.App.Ref’s version so the SDK resolves the intended targeting/runtime packs. - Adjust several Roslyn build-time tool projects to disable known-pack version updates (so they aren’t affected by the source-build targeting pack version override).
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vstest/eng/Version.Details.xml | Adds Microsoft.NETCore.App.Ref dependency for source-build targeting pack alignment. |
| src/vstest/eng/Version.Details.props | Introduces MicrosoftNETCoreAppRefPackageVersion / MicrosoftNETCoreAppRefVersion properties. |
| src/vstest/Directory.Build.props | Sets source-build KnownFrameworkReference*/KnownCrossgen2Pack* properties to the live ref-pack version. |
| src/templating/eng/Version.Details.xml | Adds Microsoft.NETCore.App.Ref dependency for source-build. |
| src/templating/eng/Version.Details.props | Introduces MicrosoftNETCoreAppRefPackageVersion / MicrosoftNETCoreAppRefVersion properties. |
| src/templating/Directory.Build.props | Configures source-build targeting pack “Known*” versions using the live ref-pack version. |
| src/sourcelink/src/Directory.Build.props | Configures source-build targeting pack “Known*” versions using the live ref-pack version. |
| src/sourcelink/eng/Version.Details.xml | Adds Microsoft.NETCore.App.Ref dependency for source-build. |
| src/sourcelink/eng/Version.Details.props | Introduces MicrosoftNETCoreAppRefPackageVersion / MicrosoftNETCoreAppRefVersion properties. |
| src/roslyn/src/Tools/GenerateRulesMissingDocumentation/GenerateRulesMissingDocumentation.csproj | Disables known-pack version updates for this build-time tool. |
| src/roslyn/src/RoslynAnalyzers/Tools/GenerateDocumentationAndConfigFilesForBrokenRuntime/GenerateDocumentationAndConfigFilesForBrokenRuntime.csproj | Disables known-pack version updates for this build-time tool. |
| src/roslyn/src/RoslynAnalyzers/Tools/GenerateDocumentationAndConfigFiles/GenerateDocumentationAndConfigFiles.csproj | Disables known-pack version updates for this build-time tool. |
| src/roslyn/src/RoslynAnalyzers/Tools/GenerateAnalyzerNuspec/GenerateAnalyzerNuspec.csproj | Disables known-pack version updates for this build-time tool. |
| src/roslyn/src/CodeStyle/Tools/CodeStyleConfigFileGenerator.csproj | Disables known-pack version updates for this build-time tool. |
| src/roslyn/eng/targets/Imports.BeforeArcade.targets | Sets source-build KnownFrameworkReference*/KnownCrossgen2Pack* properties to the live ref-pack version. |
| src/roslyn/eng/Version.Details.xml | Adds Microsoft.NETCore.App.Ref dependency for source-build. |
| src/roslyn/eng/Version.Details.props | Introduces MicrosoftNETCoreAppRefPackageVersion / MicrosoftNETCoreAppRefVersion properties. |
| src/razor/eng/Version.Details.xml | Adds Microsoft.NETCore.App.Ref dependency for source-build. |
| src/razor/eng/Version.Details.props | Introduces MicrosoftNETCoreAppRefPackageVersion / MicrosoftNETCoreAppRefVersion properties. |
| src/razor/Directory.Build.props | Configures source-build targeting pack “Known*” versions using the live ref-pack version. |
| src/nuget-client/eng/Version.Details.xml | Adds Microsoft.NETCore.App.Ref dependency for source-build. |
| src/nuget-client/eng/Version.Details.props | Introduces MicrosoftNETCoreAppRefPackageVersion / MicrosoftNETCoreAppRefVersion properties. |
| src/nuget-client/Directory.Build.props | Configures source-build targeting pack “Known*” versions using the live ref-pack version. |
| src/msbuild/eng/Version.Details.xml | Adds Microsoft.NETCore.App.Ref dependency for source-build. |
| src/msbuild/eng/Version.Details.props | Introduces MicrosoftNETCoreAppRefPackageVersion / MicrosoftNETCoreAppRefVersion properties. |
| src/msbuild/Directory.Build.props | Configures source-build targeting pack “Known*” versions using the live ref-pack version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I think this will break the existing repo source build jobs. The tooling repos target net10.0 in repo source build as they use Arcade 10 which sets NetCurrent to net10.0. Using live packs is a product build concept only. Also, these repos don't consume build dependencies from the VMR so the added Version.Details entries will never get updated. That leads me to think that this is truely a VMR only concept and should be handled there. |
It looks like this completed successfully, modulo some build flakiness which looks a bit like out-of-disk space on a single job.
I see - in that case I would remove the D.B.props changes but keep the Version changes, then uncomment the global properties in the VMR project? Tooling repos can always decide to add these properties to their own D.B.props if they see a backflow change that requires it. |
|
Yes that sounds like the right path forward. I would also revert the Version.Details changes as they will be stale and don't match versions from other runtime dependencies in Version.Details. |
I see what you mean - this is using _DependencyProducedPackage which is all the package outputs, not just those that happen to be subscribed. |
9a84c65 to
7384d29
Compare
|
All right using that approach. Test build is https://dev.azure.com/dnceng/internal/_build/results?buildId=2917634&view=results. Note to approvers -- |
Similarly to P2Ps it holds the outputs from direct and transitive repository references. |
|
Looks like our internal build passed, so this should avoid the previous regression here. Thanks for your help @ViktorHofer -- I updated the comments. |
|
I'm now skeptical if this is working. I am hitting a similar failure as before in roslyn in source build -- https://dev.azure.com/dnceng-public/public/_build/results?buildId=1319208&view=logs&j=f8361ec4-8613-5f7f-2f10-d7dd7654e93f&t=f0818e4f-8d19-558f-794d-f0f07fd49e52 Binlog shows values not set -- |
Co-authored-by: Viktor Hofer <[email protected]>
|
Ok, need a new official build test for this. https://dev.azure.com/dnceng/internal/_build/results?buildId=2918850&view=results I'd also like to see #5206 make it past the roslyn failures around using the old targeting pack. NO MERGE until those happen. |
|
Official build failing with: Given the isolated and disconnected failure, I think it might be flaky. Rerunning. #5206 made it through phase1 so I think this change is good from a completeness perspective. |
Indeed it was. Passed on rerun. Will file an issue. |
Retry #4801
Address dotnet/source-build#5502 (comment)
Testing internally with https://dev.azure.com/dnceng/internal/_build/results?buildId=2916776&view=results
Will iterate on internal build pipeline to ensure this doesn't break official build.