Skip to content

Commit f08ae33

Browse files
authored
Switch to built-in IsTrimmable property (#41021)
1 parent 99ae156 commit f08ae33

File tree

39 files changed

+45
-44
lines changed

39 files changed

+45
-44
lines changed

eng/CodeGen.proj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<_RequiresDelayedBuild Include="@(_ProvidesReferenceOrRequiresDelay->WithMetadataValue('RequiresDelayedBuild','true')->Distinct())" />
2525
<_SharedFrameworkAndPackageRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'true'))" />
2626
<_SharedFrameworkRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'false'))" />
27-
<_TrimmableProject Include="@(_ProjectReferenceProvider->WithMetadataValue('Trimmable', 'true'))" />
27+
<_TrimmableProject Include="@(_ProjectReferenceProvider->WithMetadataValue('IsTrimmable', 'true'))" />
2828
</ItemGroup>
2929

3030
<PropertyGroup>
@@ -85,7 +85,7 @@
8585
8686
This file contains a complete list of projects annotated for trimming.
8787
88-
This file is generated using the <Trimmable> properties from each .csproj in this repository.
88+
This file is generated using the <IsTrimmable> properties from each .csproj in this repository.
8989
-->
9090
<Project>
9191
<ItemGroup>

eng/TrimmableProjects.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
This file contains a complete list of projects annotated for trimming.
55
6-
This file is generated using the <Trimmable> properties from each .csproj in this repository.
6+
This file is generated using the <IsTrimmable> properties from each .csproj in this repository.
77
-->
88
<Project>
99
<ItemGroup>

eng/Workarounds.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,10 @@
4242
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
4343
</PropertyGroup>
4444

45+
<!-- Trim analyzers are automatically enabled by IsTrimming=true. They currently break when run on aspnetcore.
46+
Remove when trimming analyzers are fixed: https://github.com/dotnet/aspnetcore/issues/41016 -->
47+
<PropertyGroup>
48+
<EnableTrimAnalyzer Condition=" '$(EnableTrimAnalyzer)' == ''">false</EnableTrimAnalyzer>
49+
</PropertyGroup>
50+
4551
</Project>

eng/targets/CSharp.Common.targets

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@
9898
<_Parameter1>Serviceable</_Parameter1>
9999
<_Parameter2>True</_Parameter2>
100100
</AssemblyAttribute>
101-
102-
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(Trimmable)' == 'true'">
103-
<_Parameter1>IsTrimmable</_Parameter1>
104-
<_Parameter2>True</_Parameter2>
105-
</AssemblyAttribute>
106101
</ItemGroup>
107102
</Target>
108103

eng/targets/ResolveReferences.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
<IsAspNetCoreApp>$([MSBuild]::ValueOrDefault($(IsAspNetCoreApp),'false'))</IsAspNetCoreApp>
317317
<IsPackable>$([MSBuild]::ValueOrDefault($(IsPackable),'false'))</IsPackable>
318318
<ProjectFileRelativePath>$([MSBuild]::MakeRelative($(RepoRoot), $(MSBuildProjectFullPath)))</ProjectFileRelativePath>
319-
<Trimmable>$([MSBuild]::ValueOrDefault($(Trimmable),'false'))</Trimmable>
319+
<IsTrimmable>$([MSBuild]::ValueOrDefault($(IsTrimmable),'false'))</IsTrimmable>
320320

321321
<!-- True if the project may be referenced using a @(Reference) item. -->
322322
<IsProjectReferenceProvider>$([MSBuild]::ValueOrDefault($(IsProjectReferenceProvider),'false'))</IsProjectReferenceProvider>

src/Components/Authorization/src/Microsoft.AspNetCore.Components.Authorization.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<IsAspNetCoreApp>true</IsAspNetCoreApp>
66
<Description>Authentication and authorization support for Blazor applications.</Description>
77
<GenerateDocumentationFile>true</GenerateDocumentationFile>
8-
<Trimmable>true</Trimmable>
8+
<IsTrimmable>true</IsTrimmable>
99
<Nullable>enable</Nullable>
1010
</PropertyGroup>
1111

src/Components/Components/src/Microsoft.AspNetCore.Components.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<GenerateDocumentationFile>true</GenerateDocumentationFile>
77
<IsAspNetCoreApp>true</IsAspNetCoreApp>
88
<Nullable>enable</Nullable>
9-
<Trimmable>true</Trimmable>
9+
<IsTrimmable>true</IsTrimmable>
1010
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1111
</PropertyGroup>
1212

src/Components/Forms/src/Microsoft.AspNetCore.Components.Forms.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Description>Forms and validation support for Blazor applications.</Description>
77
<GenerateDocumentationFile>true</GenerateDocumentationFile>
88
<Nullable>enable</Nullable>
9-
<Trimmable>true</Trimmable>
9+
<IsTrimmable>true</IsTrimmable>
1010
</PropertyGroup>
1111

1212
<ItemGroup>

src/Components/Web/src/Microsoft.AspNetCore.Components.Web.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<GenerateDocumentationFile>true</GenerateDocumentationFile>
88
<RootNamespace>Microsoft.AspNetCore.Components</RootNamespace>
99
<Nullable>enable</Nullable>
10-
<Trimmable>true</Trimmable>
10+
<IsTrimmable>true</IsTrimmable>
1111
</PropertyGroup>
1212

1313
<ItemGroup>

src/Components/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
77
<Description>Authenticate your Blazor webassembly applications with Azure Active Directory and Azure Active Directory B2C</Description>
88
<GenerateDocumentationFile>true</GenerateDocumentationFile>
9-
<Trimmable>true</Trimmable>
9+
<IsTrimmable>true</IsTrimmable>
1010
</PropertyGroup>
1111

1212
<ItemGroup>

0 commit comments

Comments
 (0)