Is it possible to use PolySharp on a github Ubuntu Runner ?
Opened this issue · 7 comments
Basically, I just started using PolySharp on a project and find it amazing. Now that project repository is setup to build on Ubuntu runners on github actions and I am getting this error:
/home/runner/.nuget/packages/polysharp/1.14.1/buildTransitive/PolySharp.targets(45,5): error POLYSPCFG0001: The PolySharp source generators have been disabled on the current configuration, as they need Roslyn 4.3 in order to work. PolySharp requires the source generators to run in order to generate polyfills, so the library cannot be used without a more up to date IDE (eg. VS 2022 17.3 or greater) or .NET SDK version (.NET 6.0.400 SDK or greater). [/home/runner/work/some-module/some-module/Module.csproj]
The build process uses .Net 7 but the actual built project is .Net Framework.
Is there thing I could try to fix that or is this scenario just not a supported one ?
Are you sure it's configured to use version 7.x.x of the .NET SDK?
For reference, the error is bespoke and comes from here.
at maintainers: Is it necessary to manually check Roslyn's version? IIRC if you compile against a certain version of Nevermind, I kept reading:Microsoft.CodeAnalysis.Analyzers
, trying to use an older SDK will result in the Source Generator failing to load.
PolySharp/src/PolySharp.SourceGenerators/PolySharp.targets
Lines 41 to 43 in a7a92a9
Sooo it means it would not work without Visual Studio, so should work on a windows runner but not ubuntu right ?
I didn't say that. Roslyn is cross-platform.
Are you aware of any usage in a ubuntu pipeline ? If it could be a bug, I am happy to create a public repo with minimal reproduction scenario...
It definitely works on both windows and Linux.