Open Danielku15 opened 1 year ago
PInvoke source generation is not supported when targeting .NET Standard 2.0. The source generator uses APIs that were introduced in .NET 5, 6, and 7 (and the version in .NET 8 uses APIs that were introduced in .NET 8).
Type of issue
Missing information
Description
I would like to know if and how the source generation for platform invokes can be used in a netstandard2.0 project using .net 7 SDK. Are there any runtime dependencies for this feature, is there a NuGet package for netstandar2.0 projects or can some sources be added to the own project to make the generator work?
Page URL
https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke-source-generation
Content source URL
https://github.com/dotnet/docs/blob/main/docs/standard/native-interop/pinvoke-source-generation.md
Document Version Independent Id
572c0b50-a28d-d387-1e8c-4a271615a753
Article author
@jkoritzinsky