Closed vaLP2eh closed 5 months ago
If I remove we will to drop netstandard2.0 support.
Why should that happen? .net Standard 2.0 doesn't even support that attribute because it is in your assembly and .net Standard 2.0 doesn't even support trimming at all.
All projects and libraries which have/want to use .net 5 are blocked from using your project due to this.
Anyway. Could you please remove it or make it internal?
Another solution could be to add .net 5 as another target framework of your project and change the condition in your file from #if !NET6_0_OR_GREATER
to #if !NET5_0_OR_GREATER
.
I had to add this dirty workaround to my csproj file to get rid of the CS0433:
<PackageReference Include="Avalonia.Xaml.Interactivity" Version="11.0.10.1" Aliases="AXI" />
Anyway. It would be nice if you remove the attributes again or make them internal.
Fixed in 11.0.10.2
src/Avalonia.Xaml.Interactivity/System/Diagnostics/CodeAnalysis/TrimmingAttributes.cs
error CS0433: The type 'RequiresUnreferencedCodeAttribute' exists in both 'Avalonia.Xaml.Interactivity, Version=11.0.10.1, Culture=neutral, PublicKeyToken=e1c1f6030f574d02' and 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
https://learn.microsoft.com/.../CS0433
Please remove these System attributes from your project or make them internal.