Skip to content

[Feature Request] Use IsAotCompatible to mark projects as AOT CompatibleΒ #5248

@keegan-caruso

Description

@keegan-caruso

MSAL client type

Confidential

Problem statement

<PropertyGroup Condition="'$(TargetFramework)' == '$(TargetFrameworkNet)' ">

This should be replaced with

  <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
    <IsAotCompatible>true</IsAotCompatible>
  </PropertyGroup>

And then errors need to be fixed or APIs/types need to be annotated.

For example, Marhsall.SizeOf(type) needs to switch to Marshall.SizeOf

Proposed solution

Use

  <PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">
    <IsAotCompatible>true</IsAotCompatible>
  </PropertyGroup>

Alternatives

NA

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions