Add `[AssemblyMetadata("Serviceable", "true")]` to all assemblies (#2696)

- dotnet/aspnetcore#18930
- also remove leftover NU5048 suppression; Arcade adds the icon for us
This commit is contained in:
Doug Bunting 2020-11-04 17:19:41 -08:00 коммит произвёл GitHub
Родитель be36206c30
Коммит 60cc307de8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -54,9 +54,5 @@
Suppress warnings about assembly conflicts. This happens for assemblies that ship in VS so it's irrelevant.
-->
<NoWarn>$(NoWarn);MSB3277</NoWarn>
<!--
Ignore PackageIconUrl deprecation. Work to convert to embedded icons is tracked in https://github.com/dotnet/aspnetcore-Internal/issues/3146.
-->
<NoWarn>$(NoWarn);NU5048</NoWarn>
</PropertyGroup>
</Project>

Просмотреть файл

@ -25,9 +25,7 @@
<!-- Only update the targeting pack version for preview builds. -->
<TargetingPackVersion Condition="'%(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' and '$(IsServicingBuild)' != 'true'">$(MicrosoftNETCoreAppRefPackageVersion)</TargetingPackVersion>
</KnownFrameworkReference>
</ItemGroup>
<ItemGroup>
<!-- Track compiler separately from Arcade.-->
<PackageReference Include="Microsoft.Net.Compilers.Toolset"
Version="$(MicrosoftNetCompilersToolsetPackageVersion)"
@ -37,4 +35,16 @@
<!-- Remove unneeded reference to AspNetCore.App -->
<KnownFrameworkReference Remove="Microsoft.AspNetCore.App" />
</ItemGroup>
<Target Name="GetCustomAssemblyAttributes"
BeforeTargets="GetAssemblyAttributes"
Condition=" '$(MSBuildProjectExtension)' == '.csproj' "
DependsOnTargets="InitializeSourceControlInformation">
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(Serviceable)' == 'true'">
<_Parameter1>Serviceable</_Parameter1>
<_Parameter2>True</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
</Target>
</Project>