Skip to content

Conversation

@jonathanpeppers
Copy link
Member

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

Since 5400522, if a previous CI machine runs a build from main
followed by release/6.0.1xx-preview4, it could encounter the error:

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.

There might be a more comprehensive solution here going forward, but
this should at least fix builds on our release branch for .NET 6
Preview 4.

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

Since 5400522, if a previous CI machine runs a build from `main`
followed by `release/6.0.1xx-preview4`, it could encounter the error:

    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.

There might be a more comprehensive solution here going forward, but
this should at least fix builds on our release branch for .NET 6
Preview 4.
@jonathanpeppers
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jonathanpeppers
Copy link
Member Author

Closing this in favor of: #5918

@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.

1 participant