Skip to content

Roslyn analyzer execution incompatible with preview version difference #5502

@mthalman

Description

@mthalman

dotnet/dotnet#4801 caused a regression for all source build legs. It's attempting to execute an analyzer targeting a new preview version (11.0 P3) using an older SDK version (11.0 P1).

Exec
    Assembly = /__w/1/s/.dotnet/sdk/11.0.100-preview.1.26104.118/Microsoft.Build.Tasks.Core.dll
    Parameters
        Command = "/__w/1/s/.dotnet/dotnet" "/__w/1/s/src/roslyn/artifacts/bin/CodeStyleConfigFileGenerator/Release/net11.0/CodeStyleConfigFileGenerator.dll" "CSharp" "/__w/1/s/src/roslyn/artifacts/bin/Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes/Release/netstandard2.0" "Microsoft.CodeAnalysis.CSharp.CodeStyle.targets" "/__w/1/s/src/roslyn/artifacts/bin/Microsoft.CodeAnalysis.CodeStyle/Release/netstandard2.0/Microsoft.CodeAnalysis.CodeStyle.dll;/__w/1/s/src/roslyn/artifacts/bin/Microsoft.CodeAnalysis.CSharp.CodeStyle/Release/netstandard2.0/Microsoft.CodeAnalysis.CSharp.CodeStyle.dll"
    CommandLineArguments = "/__w/1/s/.dotnet/dotnet" "/__w/1/s/src/roslyn/artifacts/bin/CodeStyleConfigFileGenerator/Release/net11.0/CodeStyleConfigFileGenerator.dll" "CSharp" "/__w/1/s/src/roslyn/artifacts/bin/Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes/Release/netstandard2.0" "Microsoft.CodeAnalysis.CSharp.CodeStyle.targets" "/__w/1/s/src/roslyn/artifacts/bin/Microsoft.CodeAnalysis.CodeStyle/Release/netstandard2.0/Microsoft.CodeAnalysis.CodeStyle.dll;/__w/1/s/src/roslyn/artifacts/bin/Microsoft.CodeAnalysis.CSharp.CodeStyle/Release/netstandard2.0/Microsoft.CodeAnalysis.CSharp.CodeStyle.dll"
    Errors
        /__w/1/s/src/roslyn/src/CodeStyle/CSharp/CodeFixes/Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.csproj(34,5): error MSB3073: The command ""/__w/1/s/.dotnet/dotnet" "/__w/1/s/src/roslyn/artifacts/bin/CodeStyleConfigFileGenerator/Release/net11.0/CodeStyleConfigFileGenerator.dll" "CSharp" "/__w/1/s/src/roslyn/artifacts/bin/Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes/Release/netstandard2.0" "Microsoft.CodeAnalysis.CSharp.CodeStyle.targets" "/__w/1/s/src/roslyn/artifacts/bin/Microsoft.CodeAnalysis.CodeStyle/Release/netstandard2.0/Microsoft.CodeAnalysis.CodeStyle.dll;/__w/1/s/src/roslyn/artifacts/bin/Microsoft.CodeAnalysis.CSharp.CodeStyle/Release/netstandard2.0/Microsoft.CodeAnalysis.CSharp.CodeStyle.dll"" exited with code 150. [/__w/1/s/src/roslyn/src/CodeStyle/CSharp/CodeFixes/Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes.csproj]
    Messages
        You must install or update .NET to run this application.
        App: /__w/1/s/src/roslyn/artifacts/bin/CodeStyleConfigFileGenerator/Release/net11.0/CodeStyleConfigFileGenerator.dll
        Architecture: x64
        Framework: 'Microsoft.NETCore.App', version '11.0.0-preview.3.26124.119' (x64)
        .NET location: /__w/1/s/.dotnet/
        The following frameworks were found:
          11.0.0-preview.1.26104.118 at [/__w/1/s/.dotnet/shared/Microsoft.NETCore.App]
        Learn more:
        https://aka.ms/dotnet/app-launch-failed
        To install missing framework, download:
        https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=11.0.0-preview.3.26124.119&arch=x64&rid=linux-x64&os=centos.10

Example failed build (internal link)

Metadata

Metadata

Assignees

Labels

ops-monitorIssues created/handled by the source build monitor roleuntriaged

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions