Testura.Code icon indicating copy to clipboard operation
Testura.Code copied to clipboard

Add netstandard2.0 support to allow using Testura.Code within a Roslyn source generator project

Open asyncmeow opened this issue 9 months ago • 3 comments

I'm working on making some source generators I use in my own projects into it's own project, later to be published on NuGet, and I saw this project while I was cleaning up the code a bit and looking for a way to make my code generation a bit nicer. I decided to try and port this project to the .NET version required for source generators.

  • [X] Add netstandard2.0 target to Testura.Code and Testura.Code.Tests
  • [X] Add PolySharp dependency to Testura.Code to polyfill features from newer C# versions into netstandard2.0 builds
    • This is a source generator only dependency, so it should not be a transitive dependency pulled in by projects depending on Testura.Code, and the source generator only adds code when targeting newer C# versions with older target frameworks.
  • [X] Fix code that relies on non-polyfilled C# features within Testura.Code until the project builds
  • [x] Make test project build
  • [ ] Make sure tests succeed

Will update in comments on my current progress so far on this.

asyncmeow avatar May 06 '24 00:05 asyncmeow