Cleanup Mono remnants

This commit is contained in:
Qstick 2021-03-09 22:26:22 -05:00
parent 714530a556
commit 9d2d308b95
11 changed files with 0 additions and 77 deletions

View file

@ -1,6 +1,4 @@
<Project>
<Import Project="Targets/PublishAllRids.targets" />
<Import Project="Targets/FixBindingRedirects.targets" />
<Import Project="Targets/MonoFacades.targets" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and !$(RuntimeIdentifier.StartsWith('win'))" />
<Import Project="Targets/CopyRuntimes.targets" />
</Project>

View file

@ -1,3 +0,0 @@
Copied from mono/4.5/Facades of the mono 5.4 release.
These are the mono version of the dotnet Core TypeForwardedTo assemblies.
Using these assemblies is no longer necessary once we reach mono 5.18 as minimum version

View file

@ -3,12 +3,9 @@ using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using FluentValidation;
using Newtonsoft.Json;
using NLog;
using NzbDrone.Common.Extensions;
using NzbDrone.Common.Http;
using NzbDrone.Core.Annotations;
using NzbDrone.Core.Configuration;

View file

@ -1,17 +0,0 @@
<Project>
<Target Name="FixBindingRedirects"
AfterTargets="ResolveAssemblyReferences"
BeforeTargets="GenerateBindingRedirects">
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and '$(RuntimeIdentifier)' == 'linux-x64'">
<SuggestedBindingRedirects Remove="System.Net.Http, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and $(RuntimeIdentifier.StartsWith('win'))">
<SuggestedBindingRedirects Remove="System.Runtime.InteropServices.RuntimeInformation, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</ItemGroup>
</Target>
</Project>

View file

@ -1,52 +0,0 @@
<Project>
<!--
When compiling without mono, but targeting mono we need to replace some assemblies with facades to make it run on mono.
This MonoFacades.targets file should only be included if not targeting windows and targeting net4x.
Warning: We ONLY support facades that reside directly in MonoFacadesPath, otherwise the joining of items becomes complicated.
Any MonoFacade listed that doesn't exist on disk will be removed instead of replaced.
See: https://github.com/mono/mono/blob/master/tools/nuget-hash-extractor/download.sh
That list defines assemblies that are prohibited from being loaded from the appdir, instead loading from mono GAC.
-->
<PropertyGroup>
<MonoFacadesPath>$(MSBuildThisFileDirectory)..\Libraries\Mono\</MonoFacadesPath>
<ResolveReferencesDependsOn>
$(ResolveReferencesDependsOn);
SubstituteMonoFacadesBuild
</ResolveReferencesDependsOn>
</PropertyGroup>
<ItemGroup>
<MonoFacade Include="$(MonoFacadesPath)*.dll" />
<MonoFacade Include="System.IO.Compression.dll" />
<MonoFacade Include="System.Net.Http.dll" />
<!-- List of MonoFacade by FileName -->
<MonoFacade_Facade Include="@(MonoFacade->'%(Filename)%(Extension)')" />
</ItemGroup>
<Target Name="SubstituteMonoFacadesBuild"
AfterTargets="ResolveAssemblyReferences"
BeforeTargets="GenerateBindingRedirects">
<ItemGroup>
<!-- List of ReferenceCopyLocalPaths by FileName and filter out those without Facades -->
<MonoFacade_Resolved Include="@(ReferenceCopyLocalPaths->'%(Filename)%(Extension)')">
<OriginalIdentity>%(ReferenceCopyLocalPaths.Identity)</OriginalIdentity>
<MonoFacadeIdentity>$(MonoFacadesPath)%(Filename)%(Extension)</MonoFacadeIdentity>
</MonoFacade_Resolved>
<MonoFacade_Unrelated Include="@(MonoFacade_Resolved)" />
<MonoFacade_Unrelated Remove="@(MonoFacade_Facade)" />
<MonoFacade_Resolved Remove="@(MonoFacade_Unrelated)" />
<!-- Modify the actual copy list -->
<ReferenceCopyLocalPaths Remove="@(MonoFacade_Resolved->'%(OriginalIdentity)')" />
<ReferenceCopyLocalPaths Include="@(MonoFacade_Resolved->'%(MonoFacadeIdentity)')" Condition="Exists('%(MonoFacade_Resolved.MonoFacadeIdentity)')" />
</ItemGroup>
</Target>
</Project>