Skip to content

Commit b4326b3

Browse files
authored
[release/3.1] Add [AssemblyMetadata("Serviceable", "true")] to all assemblies (#2696) (#2701)
- cherry-pick 60cc307 from master - dotnet/aspnetcore#18930
1 parent 0de1f97 commit b4326b3

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Directory.Build.targets

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,23 @@
2525
<!-- Only update the targeting pack version for preview builds. -->
2626
<TargetingPackVersion Condition="'%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' and '$(IsServicingBuild)' != 'true'">$(MicrosoftNETCoreAppRefPackageVersion)</TargetingPackVersion>
2727
</KnownFrameworkReference>
28-
</ItemGroup>
2928

30-
<ItemGroup>
3129
<!-- Track compiler separately from Arcade.-->
3230
<PackageReference Include="Microsoft.Net.Compilers.Toolset"
3331
Version="$(MicrosoftNetCompilersToolsetPackageVersion)"
3432
PrivateAssets="all"
3533
IsImplicitlyDefined="true" />
3634
</ItemGroup>
35+
36+
<Target Name="GetCustomAssemblyAttributes"
37+
BeforeTargets="GetAssemblyAttributes"
38+
Condition=" '$(MSBuildProjectExtension)' == '.csproj' "
39+
DependsOnTargets="InitializeSourceControlInformation">
40+
<ItemGroup>
41+
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(Serviceable)' == 'true'">
42+
<_Parameter1>Serviceable</_Parameter1>
43+
<_Parameter2>True</_Parameter2>
44+
</AssemblyAttribute>
45+
</ItemGroup>
46+
</Target>
3747
</Project>

0 commit comments

Comments
 (0)