Skip to content

v5.0.101-servicing.20601.7 build fails to build using 5.0.101 SDK: BundledNETCorePlatformsPackageVersion 5.0.0 does not match BundledNETCoreAppPackageVersion 5.0.1 #15132

@dagood

Description

@dagood

When I check out v5.0.101-servicing.20601.7 and apply this patch to build using the 5.0.101 SDK, building on Linux (a CentOS 7 Docker container) fails:

diff --git a/global.json b/global.json
index 46d33c28a..a3f916fd6 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
 {
   "tools": {
-    "dotnet": "5.0.100",
+    "dotnet": "5.0.101",
     "runtimes": {
       "dotnet": [
         "$(MicrosoftNETCoreAppInternalPackageVersion)"
$ ./build.sh --restore --build --pack /bl
...
  Writing file: /work/artifacts/bin/redist/Debug/net5.0/vstest.console.runtimeconfig.json
  5.0.101
/work/src/Layout/redist/targets/OverlaySdkOnLKG.targets(32,5): error MSB4018: The "OverrideAndCreateBundledNETCoreAppPackageVersion" task failed unexpectedly. [/work/src/Layout/redist/redist.csproj]
/work/src/Layout/redist/targets/OverlaySdkOnLKG.targets(32,5): error MSB4018: System.ApplicationException: <BundledNETCorePlatformsPackageVersion>5.0.0</BundledNETCorePlatformsPackageVersion> version 5.0.0 does not match BundledNETCoreAppPackageVersion 5.0.1. The schema of https://github.com/dotnet/installer/blob/master/src/redist/targets/GenerateBundledVersions.targets might change. We need to ensure we can swap the runtime version from what's in stage0 to what dotnet/sdk used successfully [/work/src/Layout/redist/redist.csproj]
/work/src/Layout/redist/targets/OverlaySdkOnLKG.targets(32,5): error MSB4018:    at Microsoft.DotNet.Build.Tasks.OverrideAndCreateBundledNETCoreAppPackageVersion.<ExecuteInternal>g__CheckAndReplaceElement|14_0(XElement element, <>c__DisplayClass14_0& ) in /work/src/Layout/toolset-tasks/OverrideAndCreateBundledNETCoreAppPackageVersion.cs:line 65 [/work/src/Layout/redist/redist.csproj]
/work/src/Layout/redist/targets/OverlaySdkOnLKG.targets(32,5): error MSB4018:    at Microsoft.DotNet.Build.Tasks.OverrideAndCreateBundledNETCoreAppPackageVersion.ExecuteInternal(String stage0MicrosoftNETCoreAppRefPackageVersionContent, String microsoftNETCoreAppRefPackageVersion) in /work/src/Layout/toolset-tasks/OverrideAndCreateBundledNETCoreAppPackageVersion.cs:line 86 [/work/src/Layout/redist/redist.csproj]
/work/src/Layout/redist/targets/OverlaySdkOnLKG.targets(32,5): error MSB4018:    at Microsoft.DotNet.Build.Tasks.OverrideAndCreateBundledNETCoreAppPackageVersion.Execute() in /work/src/Layout/toolset-tasks/OverrideAndCreateBundledNETCoreAppPackageVersion.cs:line 41 [/work/src/Layout/redist/redist.csproj]
/work/src/Layout/redist/targets/OverlaySdkOnLKG.targets(32,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/work/src/Layout/redist/redist.csproj]
/work/src/Layout/redist/targets/OverlaySdkOnLKG.targets(32,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/work/src/Layout/redist/redist.csproj]

[The build then seems to hang, but it might just be doing some expensive silent ops]

Binlog: sdk-5.0.1-using-5.0.1.binlog.zip

I don't understand what this task/target is doing, so I'm not sure why it expects BundledNETCorePlatformsPackageVersion and BundledNETCoreAppPackageVersion to match. It seems like there's an assumption that the repo will always be built with 5.0.100 but I don't know if that assumption is intended or not.

It appears this error message was implemented in #12775.

Being able to build this repo using a same SDK that's being built is critical for dotnet/source-build. Part of bootstrapping involves taking the repo and building it using its own outputs, to help ensure there are no prebuilts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions