Skip to content

error CS8784: Generator 'DownlevelLibraryImportGenerator' failed to initialize on osx-arm64 #107497

Closed

Description

@am11

On osx-arm64, using current tip of main 5c4686f from clean state:

$ dotnet nuget locals all --clear

$ cd runtime
$ git clean -xdf
$ git rev-parse HEAD
5c4686f831d34c2c127e943d0f0d144793eeb0ad

$ ./build.sh clr+libs -c Release
...
  Restored /Users/adeel/projects/runtime5/src/coreclr/tools/SuperFileCheck/SuperFileCheck.csproj (in 59,59 sec).
  Restored /Users/adeel/projects/runtime5/src/native/managed/cdacreader/src/cdacreader.csproj (in 1,79 min).
  Restored /Users/adeel/projects/runtime5/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj (in 1,11 min).
  Restored /Users/adeel/projects/runtime5/src/coreclr/tools/r2rdump/R2RDump.csproj (in 1,18 min).
  Restored /Users/adeel/projects/runtime5/src/coreclr/tools/dotnet-pgo/dotnet-pgo.csproj (in 1,22 min).
  installer.tasks -> /Users/adeel/projects/runtime5/artifacts/bin/installer.tasks/Release/net9.0/installer.tasks.dll
  Crossgen2Tasks -> /Users/adeel/projects/runtime5/artifacts/bin/Crossgen2Tasks/Release/net9.0/Crossgen2Tasks.dll
  Microsoft.Interop.SourceGeneration -> /Users/adeel/projects/runtime5/artifacts/bin/Microsoft.Interop.SourceGeneration/Release/netstandard2.0/Microsoft.Interop.SourceGeneration.dll
  DownlevelLibraryImportGenerator -> /Users/adeel/projects/runtime5/artifacts/bin/DownlevelLibraryImportGenerator/Release/netstandard2.0/Microsoft.Interop.LibraryImportGenerator.Downlevel.dll
CSC : error CS8784: Generator 'DownlevelLibraryImportGenerator' failed to initialize. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'FileNotFoundException' with message 'Could not load file or assembly 'Microsoft.Interop.SourceGeneration, Version=42.42.42.42, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the path specified. [/Users/adeel/projects/runtime5/src/tasks/installer.tasks/installer.tasks.csproj::TargetFramework=net472]

It is looking for net472. On, e.g. linux-arm64, it only looks for netstandard2.0 and does not fail:

  Restored /runtime/src/libraries/System.DirectoryServices/src/System.DirectoryServices.csproj (in 1.71 min).
  installer.tasks -> /runtime/artifacts/bin/installer.tasks/Release/net9.0/installer.tasks.dll
  Crossgen2Tasks -> /runtime/artifacts/bin/Crossgen2Tasks/Release/net9.0/Crossgen2Tasks.dll
  Microsoft.Interop.SourceGeneration -> /runtime/artifacts/bin/Microsoft.Interop.SourceGeneration/Release/netstandard2.0/Microsoft.Interop.SourceGeneration.dll
  DownlevelLibraryImportGenerator -> /runtime/artifacts/bin/DownlevelLibraryImportGenerator/Release/netstandard2.0/Microsoft.Interop.LibraryImportGenerator.Downlevel.dll
  installer.tasks -> /runtime/artifacts/bin/installer.tasks/Release/net472/installer.tasks.dll

Activity

  1. dotnet-policy-service commented on Sep 7, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/interop-contrib
    See info in area-owners.md if you want to be subscribed.

  2. am11 commented on Sep 7, 2024

    @am11
    MemberAuthor
  3. jkoritzinsky commented on Sep 11, 2024

    @jkoritzinsky
    Member

    @am11 can you get a compilation log (using https://github.com/jaredpar/complog)?

  4. added this to the 10.0.0 milestone on Sep 11, 2024
  5. removed
    untriagedNew issue has not been triaged by the area owner
    on Sep 11, 2024
  6. am11 commented on Oct 8, 2024

    @am11
    MemberAuthor

    This is now fixed (perhaps since #107746).

  7. locked and limited conversation to collaborators on Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions