Skip to content

Build FAILED after #106209 PR (Implement type name resolution for ILLink analyzer) #106321

@AlexRadch

Description

@AlexRadch

Description

After I installed the new .NET SDK 9.0.100-preview.7.24407.12 globally, the runtime build was successful.

Can not build runtime after #106209 PR (Implement type name resolution for ILLink analyzer)

With the next log:

  System.Private.CoreLib -> C:\AProj\runtime\artifacts\bin\System.Private.CoreLib\ref\Release\net9.0\System.Private.CoreLib.dll

Build FAILED.

CSC : error CS8032: An instance of analyzer ILLink.RoslynAnalyzer.RequiresUnreferencedCodeAnalyzer cannot be created from C:\AProj\runtime\artifacts\bin\ILLink.RoslynAnalyzer\Debug\netstandard2.0\ILLink.RoslynAnalyzer.dll : Could not load file or assembly 'System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The specified file cannot be found. [C:\AProj\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
CSC : error CS8032: An instance of analyzer ILLink.RoslynAnalyzer.RequiresAssemblyFilesAnalyzer cannot be created from C:\AProj\runtime\artifacts\bin\ILLink.RoslynAnalyzer\Debug\netstandard2.0\ILLink.RoslynAnalyzer.dll : Could not load file or assembly 'System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The specified file cannot be found. [C:\AProj\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
CSC : error CS8032: An instance of analyzer ILLink.RoslynAnalyzer.COMAnalyzer cannot be created from C:\AProj\runtime\artifacts\bin\ILLink.RoslynAnalyzer\Debug\netstandard2.0\ILLink.RoslynAnalyzer.dll : Could not load file or assembly 'System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The specified file cannot be found. [C:\AProj\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
CSC : error CS8032: An instance of analyzer ILLink.RoslynAnalyzer.DynamicallyAccessedMembersAnalyzer cannot be created from C:\AProj\runtime\artifacts\bin\ILLink.RoslynAnalyzer\Debug\netstandard2.0\ILLink.RoslynAnalyzer.dll : Could not load file or assembly 'System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The specified file cannot be found. [C:\AProj\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
CSC : error CS8032: An instance of analyzer ILLink.RoslynAnalyzer.RequiresDynamicCodeAnalyzer cannot be created from C:\AProj\runtime\artifacts\bin\ILLink.RoslynAnalyzer\Debug\netstandard2.0\ILLink.RoslynAnalyzer.dll : Could not load file or assembly 'System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The specified file cannot be found. [C:\AProj\runtime\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj]
    0 Warning(s)
    5 Error(s)

Time Elapsed 00:01:14.99
Build failed with exit code 1. Check errors above.
Some builds failed:
        Configuration: Debug, Architecture: x64

Reproduction Steps

git clean -xdf
git pull upstream main
build.cmd clr+libs -rc Release

Expected behavior

Successful Build.

Actual behavior

Build FAILED

Regression?

Yes

Known Workarounds

  1. After I removed the .Net 9 global SDK, the build was successful.
  2. Or use runtime before this PR.

Configuration

.NET 9.0.100-preview.6.24328.19 installed globally
Windows 10
x64

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions