Skip to content

Conversation

@jonathanpeppers
Copy link
Member

Context: dotnet/runtime#77385

Building net6.0-android and net7.0-android apps with .NET 8 is failing with:

Microsoft.Android.Sdk.RuntimeConfig.targets(46,5): error MSB4036: The "RuntimeConfigParserTask" task was not found.
Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "/Users/runner/work/1/s/xamarin-android/bin/Release/dotnet/sdk/8.0.100-alpha.1.22553.2" directory.

The problem appears to be due to the import ordering:

8.0.100-alpha.1/microsoft.net.workload.mono.toolchain.net6/WorkloadManifest.targets
8.0.100-alpha.1/microsoft.net.workload.mono.toolchain.net7/WorkloadManifest.targets
8.0.100-alpha.1/microsoft.net.workload.mono.toolchain/WorkloadManifest.targets

Where the third one should be imported first for this to work.

I believe this broke in 5f3deea, which inadvertently put these files in the 8.0.100-alpha.1 directory instead of 8.0.100.

The "baseline" version is always imported first, which is 8.0.100:

https://github.com/dotnet/installer/blob/c09cc8aada26be846359961fe160b5eff528d9df/src/redist/targets/BundledManifests.targets#L9-L13

Move the location of these files to hopefully fix this issue.

Context: dotnet/runtime#77385

Building `net6.0-android` and `net7.0-android` apps with .NET 8 is
failing with:

    Microsoft.Android.Sdk.RuntimeConfig.targets(46,5): error MSB4036: The "RuntimeConfigParserTask" task was not found.
    Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "/Users/runner/work/1/s/xamarin-android/bin/Release/dotnet/sdk/8.0.100-alpha.1.22553.2" directory.

The problem appears to be due to the import ordering:

    8.0.100-alpha.1/microsoft.net.workload.mono.toolchain.net6/WorkloadManifest.targets
    8.0.100-alpha.1/microsoft.net.workload.mono.toolchain.net7/WorkloadManifest.targets
    8.0.100-alpha.1/microsoft.net.workload.mono.toolchain/WorkloadManifest.targets

Where the third one should be imported first for this to work.

I believe this broke in 5f3deea, which inadvertently put these files
in the `8.0.100-alpha.1` directory instead of `8.0.100`.

The "baseline" version is always imported first, which is `8.0.100`:

https://github.com/dotnet/installer/blob/c09cc8aada26be846359961fe160b5eff528d9df/src/redist/targets/BundledManifests.targets#L9-L13

Move the location of these files to hopefully fix this issue.
@jonathanpeppers
Copy link
Member Author

It appears this change doesn't break a local mac build for me:

git clean -dxf ; git submodule foreach git clean -dxf
make prepare all

And then it also fixes the failing tests?

@jonpryor jonpryor merged commit 88f0b29 into dotnet:main Nov 5, 2022
@jonathanpeppers jonathanpeppers deleted the mono-workload-version-band branch November 7, 2022 14:28
grendello added a commit to grendello/xamarin-android that referenced this pull request Nov 7, 2022
* main:
  [xaprepare] use 8.0.100 version band for Mono workloads (dotnet#7530)
grendello added a commit to grendello/xamarin-android that referenced this pull request Nov 9, 2022
* main:
  [docs] notes on binding `gradle-wrapper.jar` (dotnet#7529)
  [NuGet] Add back the `dotnet7` feed (dotnet#7534)
  [xaprepare] use 8.0.100 version band for Mono workloads (dotnet#7530)
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants