Skip to content

Conversation

@jonathanpeppers
Copy link
Member

@jonathanpeppers jonathanpeppers commented May 6, 2021

Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=4728381&view=ms.vss-test-web.build-test-results-tab&runId=21435278&resultId=100052&paneView=attachments

CI on some of our release branches is failing with errors such as:

UnnamedProject.csproj: warning MSB4242: The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed to run. An item with the same key has already been added. Key: microsoft-android-sdk-full
Microsoft.NET.Sdk.ImportWorkloads.props(14,3): warning MSB4242: The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed to run. An item with the same key has already been added. Key: microsoft-android-sdk-full
Microsoft.NET.Sdk.ImportWorkloads.props(14,38): error MSB4236: The SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator' specified could not be found.

This could happen if both directories exist:

dotnet/sdk-manifest/6.0.100/Microsoft.NET.Workload.Android
dotnet/sdk-manifest/6.0.100/Microsoft.NET.Sdk.Android

Which would define the same Android workload twice.

xaprepare was setup to clean certain folders in
$(AndroidToolchainDirectory)\dotnet, but also needs to delete:

  • sdk-manifests/6.0.100/*Android*
  • template-packs/*Android*

I also changed some of the string comparisons to use
StringComparison.OrdinalIgnoreCase.

Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=4728381&view=ms.vss-test-web.build-test-results-tab&runId=21435278&resultId=100052&paneView=attachments

CI on some of our release branches is failing with errors such as:

    UnnamedProject.csproj: warning MSB4242: The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed to run. An item with the same key has already been added. Key: microsoft-android-sdk-full
    Microsoft.NET.Sdk.ImportWorkloads.props(14,3): warning MSB4242: The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed to run. An item with the same key has already been added. Key: microsoft-android-sdk-full
    Microsoft.NET.Sdk.ImportWorkloads.props(14,38): error MSB4236: The SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator' specified could not be found.

This could happen if both directories exist:

    dotnet/sdk-manifest/6.0.100/Microsoft.NET.Workload.Android
    dotnet/sdk-manifest/6.0.100/Microsoft.NET.Sdk.Android

Which would define the same Android workload twice.

xaprepare was setup to clean certain folders in
`$(AndroidToolchainDirectory)\dotnet`, but also needs to delete:

* sdk-manifests/6.0.100/*Android*
* template-packs/*Android*

I also changed some of the string comparisons to use
`StringComparison.OrdinalIgnoreCase`.
@jonathanpeppers
Copy link
Member Author

Only failures seem to be network-related:

Failed to install required Android SDK components. Consider setting $(AndroidDependencyInstallationTimeout) to a value larger than '7' minutes.

Going to merge this, so it hopefully fixes our .NET 6 release branch.

@jonathanpeppers jonathanpeppers merged commit ac9a11f into dotnet:main May 6, 2021
@jonathanpeppers jonathanpeppers deleted the xaprepare-dotnet-cleanup branch May 6, 2021 21:44
jonathanpeppers added a commit that referenced this pull request May 6, 2021
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=4728381&view=ms.vss-test-web.build-test-results-tab&runId=21435278&resultId=100052&paneView=attachments

CI on some of our release branches is failing with errors such as:

    UnnamedProject.csproj: warning MSB4242: The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed to run. An item with the same key has already been added. Key: microsoft-android-sdk-full
    Microsoft.NET.Sdk.ImportWorkloads.props(14,3): warning MSB4242: The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed to run. An item with the same key has already been added. Key: microsoft-android-sdk-full
    Microsoft.NET.Sdk.ImportWorkloads.props(14,38): error MSB4236: The SDK 'Microsoft.NET.SDK.WorkloadAutoImportPropsLocator' specified could not be found.

This could happen if both directories exist:

    dotnet/sdk-manifest/6.0.100/Microsoft.NET.Workload.Android
    dotnet/sdk-manifest/6.0.100/Microsoft.NET.Sdk.Android

Which would define the same Android workload twice.

xaprepare was setup to clean certain folders in
`$(AndroidToolchainDirectory)\dotnet`, but also needs to delete:

* sdk-manifests/6.0.100/*Android*
* template-packs/*Android*

I also changed some of the string comparisons to use
`StringComparison.OrdinalIgnoreCase`.
@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.

2 participants