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

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

Closed
dagood opened this issue Dec 30, 2020 · 0 comments · Fixed by #15168

Comments

@dagood
Copy link
Member

dagood commented Dec 30, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant