You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Source generator generates code using unsafe even if EnableUnsafeBlocks isn't enabled. We probably should check if it is not enabled and given a better diagnostic asking EnableUnsafeBlocks to be enabled. If the CsWinRT package is referenced, this isn't an issue. But when the source generator is ran standalone as part of the projection package, it is.
WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\WinRTGenericInstantiation.g.cs(680,31,680,54): error CS0227: Unsafe code may only appear if compiling with /unsafe
The text was updated successfully, but these errors were encountered:
It is also seems for the system classes, we sometimes generate code when we don't need to like the string class as we see it as a valid winrt type but it technically isn't a winrt projected class.
Source generator generates code using unsafe even if EnableUnsafeBlocks isn't enabled. We probably should check if it is not enabled and given a better diagnostic asking EnableUnsafeBlocks to be enabled. If the CsWinRT package is referenced, this isn't an issue. But when the source generator is ran standalone as part of the projection package, it is.
WinRT.SourceGenerator\Generator.WinRTAotSourceGenerator\WinRTGenericInstantiation.g.cs(680,31,680,54): error CS0227: Unsafe code may only appear if compiling with /unsafe
The text was updated successfully, but these errors were encountered: