dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.04k stars 4.03k forks source link

CSC : error CS8034: Unable to load Analyzer assembly #74887

Closed petro2050 closed 3 weeks ago

petro2050 commented 2 months ago

Steps to Reproduce:

  1. Create a .NET 8 project using VSCode on an ARM-based Mac
  2. Create a source generator project and reference it in the .NET 8 project
  3. Run dotnet publish -r linux-x64

Expected Behavior:

should publish

Actual Behavior:

CSC : error CS8034: Unable to load Analyzer assembly path_to_generator_dll

Note that dotnet publish -r osx-arm64 succeeds.

genlu commented 2 months ago

FYI @CyrusNajmabadi @jaredpar

jaredpar commented 2 months ago

Create a source generator project and reference it in the .NET 8 project

Can you provide a sample of the source generator project that you created here? Also can you show us how it was referenced in the .NET 8 project?

jaredpar commented 3 weeks ago

Closing due to lack of activity