Skip to content

Conversation

pjcollins
Copy link
Member

@pjcollins pjcollins commented Nov 16, 2020

Context: #5293
Context: https://github.com/xamarin/xamarin-android/blob/f5680e783fe45d4f536f8199372ff504ebfdc393/build-tools/automation/yaml-templates/use-dot-net.yaml

PR #5293 introduced an incompatibility with xabuild, and it appears to
be causing issues with other stable builds. The UseDotNet task has
a caching feature to improve "installation" times for certain versions,
however this can cause issues for our non-hosted build machines.

   /Users/builder/azdo/_work/_tool/dotnet/sdk/5.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(54,5): error MSB4186: Invalid static method invocation syntax: "[MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')". Method '[MSBuild]::GetTargetFrameworkIdentifier' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). Check that all parameters are defined, are of the correct type, and are specified in the right order. [/Users/builder/azdo/_work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop.GenericMarshaler/Java.Interop.GenericMarshaler.csproj]

We should continue to use the custom use-dot-net task that Jonathan
Peppers added for us during earlier .NET 5 preview work. This template
was removed in PR #5191 but in hindsight it should not have been.

Context: dotnet#5293

PR dotnet#5293 introduced an incompatibility with xabuild, and it appears to
be causing issues with other stable builds.  The [UseDotNet][1] task has
a caching feature to improve "installation" times for certain versions,
however this can cause issues for our non-hosted build machines.

    /Users/builder/azdo/_work/_tool/dotnet/sdk/5.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(54,5): error MSB4186: Invalid static method invocation syntax: "[MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')". Method '[MSBuild]::GetTargetFrameworkIdentifier' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). Check that all parameters are defined, are of the correct type, and are specified in the right order. [/Users/builder/azdo/_work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop.GenericMarshaler/Java.Interop.GenericMarshaler.csproj]

We should continue to use the custom `use-dot-net` task that Jonathan
Peppers added for us during earlier .NET 5 preview work.  This template
was removed in PR dotnet#5191 but in hindsight it should not have been.

[1]: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/dotnet-core-tool-installer?view=azure-devops
@jonathanpeppers jonathanpeppers merged commit 8d0ca1c into dotnet:master Nov 16, 2020
@pjcollins pjcollins deleted the restore-net-cleanup branch November 16, 2020 20:35
@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.

3 participants