Skip to content

Commit 51a4123

Browse files
authored
Default IsAotCompatible for ref projects (#118222)
Defaults IsAotCompatible to true for ref projects, and moves the opt-out to be shared between src/ref projects. Needed to flow AssemblyMetadata("IsAotCompatible", "True") to ref assemblies.
1 parent 2d7c63b commit 51a4123

File tree

28 files changed

+31
-15
lines changed

28 files changed

+31
-15
lines changed

src/libraries/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
<!-- Nullability is enabled by default except for test projects, which instead default to annotations. -->
4949
<Nullable Condition="'$(Nullable)' == '' and '$(IsTestProject)' != 'true'">enable</Nullable>
5050
<Nullable Condition="'$(Nullable)' == '' and '$(IsTestProject)' == 'true'">annotations</Nullable>
51-
<!-- AOT compatibility is enabled by default for src projects. -->
52-
<IsAotCompatible Condition="'$(IsAotCompatible)' == '' and '$(IsSourceProject)' == 'true'">true</IsAotCompatible>
51+
<!-- AOT compatibility is enabled by default for src/ref projects. -->
52+
<IsAotCompatible Condition="'$(IsAotCompatible)' == '' and ('$(IsSourceProject)' == 'true' or '$(IsReferenceAssemblyProject)' == 'true')">true</IsAotCompatible>
5353
</PropertyGroup>
5454

5555
<!-- Set up common paths -->

src/libraries/System.ComponentModel.Composition/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<PropertyGroup>
44
<StrongNameKeyId>ECMA</StrongNameKeyId>
55
<IsTrimmable>false</IsTrimmable>
6+
<IsAotCompatible>false</IsAotCompatible>
67
</PropertyGroup>
78
</Project>

src/libraries/System.ComponentModel.Composition/src/System.ComponentModel.Composition.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0</TargetFrameworks>
5-
<IsAotCompatible>false</IsAotCompatible>
65
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
76
<IsPackable>true</IsPackable>
87
<AddNETFrameworkPlaceholderFileToPackage>true</AddNETFrameworkPlaceholderFileToPackage>

src/libraries/System.Configuration.ConfigurationManager/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
<UnsupportedOSPlatforms>browser;wasi</UnsupportedOSPlatforms>
66
<!-- opt-out of trimming until it works https://github.com/dotnet/runtime/issues/49062 -->
77
<IsTrimmable>false</IsTrimmable>
8+
<IsAotCompatible>false</IsAotCompatible>
89
</PropertyGroup>
910
</Project>

src/libraries/System.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<PropertyGroup>
44
<TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
55
<NoWarn>$(NoWarn);CA2249</NoWarn>
6-
<IsAotCompatible>false</IsAotCompatible>
76
<IncludeInternalObsoleteAttribute>true</IncludeInternalObsoleteAttribute>
87
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
98
<IsPackable>true</IsPackable>

src/libraries/System.Data.Odbc/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<PropertyGroup>
44
<IncludePlatformAttributes>true</IncludePlatformAttributes>
55
<UnsupportedOSPlatforms>browser;wasi</UnsupportedOSPlatforms>
6+
<IsAotCompatible>false</IsAotCompatible>
67
</PropertyGroup>
78
</Project>

src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<TargetFrameworks Condition="'$(NetCoreAppPrevious)' != ''">$(TargetFrameworks);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious)-unix;$(NetCoreAppPrevious)</TargetFrameworks>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<NoWarn>$(NoWarn);CA2249;CA1838</NoWarn>
8-
<IsAotCompatible>false</IsAotCompatible>
98
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
109
<IsPackable>true</IsPackable>
1110
<PackageDescription>Provides a collection of classes used to access an ODBC data source in the managed space

src/libraries/System.Data.OleDb/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
<Import Project="..\Directory.Build.props" />
33
<PropertyGroup>
44
<SupportedOSPlatforms>windows</SupportedOSPlatforms>
5+
<IsAotCompatible>false</IsAotCompatible>
56
</PropertyGroup>
67
</Project>

src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<NoWarn>$(NoWarn);CA2249</NoWarn>
99
<!-- Suppress SYSLIB0004: 'RuntimeHelpers.PrepareConstrainedRegions()' is obsolete to avoid ifdefs. -->
1010
<NoWarn>$(NoWarn);SYSLIB0004</NoWarn>
11-
<IsAotCompatible>false</IsAotCompatible>
1211
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
1312
<IsPackable>true</IsPackable>
1413
<PackageDescription>Provides a collection of classes for OLEDB.

src/libraries/System.DirectoryServices.AccountManagement/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<PropertyGroup>
44
<StrongNameKeyId>ECMA</StrongNameKeyId>
55
<SupportedOSPlatforms>windows</SupportedOSPlatforms>
6+
<IsAotCompatible>false</IsAotCompatible>
67
</PropertyGroup>
78
</Project>

0 commit comments

Comments
 (0)