Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
am11 opened this issue Sep 7, 2024 · 5 comments

Comments

@am11
Copy link
Member

am11 commented Sep 7, 2024

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
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Sep 7, 2024
Copy link
Contributor

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

@am11
Copy link
Member Author

am11 commented Sep 7, 2024

@jkoritzinsky #106436 related.

@ergunr
Copy link

ergunr commented Sep 7, 2024 via email

@ergunr
Copy link

ergunr commented Sep 7, 2024 via email

@jkoritzinsky
Copy link
Member

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

@agocke agocke added this to the 10.0.0 milestone Sep 11, 2024
@agocke agocke removed the untriaged New issue has not been triaged by the area owner label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants