Closed hwoodiwiss closed 5 months ago
For additional context: while the property being used exists in some contexts it seems it wasn't the right one https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#targetframework
Additional evidence https://www.aloneguid.uk/posts/2022/08/csproj-condition-cheat-sheet/
Current Behaviour
Currently
IsTrimmable
is not set on a number of the Microsoft.Kiota .NET libraries as they share this incorrect condition:Expected Behaviour
I would expect build errors when non-trim-safe code as added to the libraries.
Fix
The property group condition should be changed to:
Which causes the
IsTrimmable
property to be correctly set, and any expected trimming related compilation failures to occur.I've found this issue in these projects: