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
When using IsAotCompatible in a library that targets multiple TFMs, the NETSDK1210 warning appears after removing a TFM.
IsAotCompatible and EnableAotAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable ahead-of-time compilation analysis, and set IsAotCompatible only for the supported frameworks. For example:
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
Remove the 7.0 target: <TargetFrameworks>net6.0;net8.0</TargetFrameworks>
Build and observe a NETSDK1210 warning
Further technical details
SDK 9.0.100-preview.3.24204.13
While we can workaround the issue as hinted in the warning message, is it expected that this would show up after removing the 7.0 TFM, even though you still have 8.0?
The text was updated successfully, but these errors were encountered:
Describe the bug
When using
IsAotCompatible
in a library that targets multiple TFMs, theNETSDK1210
warning appears after removing a TFM.To Reproduce
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
NETSDK1210
warningFurther technical details
9.0.100-preview.3.24204.13
While we can workaround the issue as hinted in the warning message, is it expected that this would show up after removing the 7.0 TFM, even though you still have 8.0?
The text was updated successfully, but these errors were encountered: