parent
79a10fa18f
commit
cc572729ff
@ -1,11 +1,4 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<!-- below net4.7.1 the new portable pdb format has no line numbers, pdb to mdb probably doesn't like it either -->
|
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net472'">
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Import Project="Targets/PublishAllRids.targets" />
|
<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" />
|
<Import Project="Targets/CopyRuntimes.targets" />
|
||||||
</Project>
|
</Project>
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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
|
|
@ -1,13 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net5.0;net472</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NzbDrone.Host\Radarr.Host.csproj" />
|
<ProjectReference Include="..\NzbDrone.Host\Radarr.Host.csproj" />
|
||||||
<ProjectReference Include="..\NzbDrone.Test.Common\Radarr.Test.Common.csproj" />
|
<ProjectReference Include="..\NzbDrone.Test.Common\Radarr.Test.Common.csproj" />
|
||||||
<ProjectReference Include="..\NzbDrone.Test.Dummy\Radarr.Test.Dummy.csproj" />
|
<ProjectReference Include="..\NzbDrone.Test.Dummy\Radarr.Test.Dummy.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
|
|
||||||
<Reference Include="System.ServiceProcess" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
Source: https://github.com/anderly/Expansive
|
|
||||||
Microsoft Public License (MS-PL): http://opensource.org/licenses/MS-PL
|
|
@ -1,63 +0,0 @@
|
|||||||
using NUnit.Framework;
|
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
|
||||||
using NzbDrone.Core.HealthCheck.Checks;
|
|
||||||
using NzbDrone.Core.Test.Framework;
|
|
||||||
using NzbDrone.Test.Common;
|
|
||||||
using static NzbDrone.Core.HealthCheck.Checks.MonoDebugCheck;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class MonoDebugFixture : CoreTest<MonoDebugCheck>
|
|
||||||
{
|
|
||||||
private void GivenHasStackFrame(bool hasStackFrame)
|
|
||||||
{
|
|
||||||
Mocker.GetMock<StackFrameHelper>()
|
|
||||||
.Setup(f => f.HasStackFrameInfo())
|
|
||||||
.Returns(hasStackFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void should_return_ok_if_not_mono()
|
|
||||||
{
|
|
||||||
if (PlatformInfo.IsMono)
|
|
||||||
{
|
|
||||||
throw new IgnoreException("non mono specific test");
|
|
||||||
}
|
|
||||||
|
|
||||||
Subject.Check().ShouldBeOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void should_return_ok_if_not_debug()
|
|
||||||
{
|
|
||||||
MonoOnly();
|
|
||||||
|
|
||||||
GivenHasStackFrame(false);
|
|
||||||
|
|
||||||
Subject.Check().ShouldBeOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void should_log_warning_if_not_debug()
|
|
||||||
{
|
|
||||||
MonoOnly();
|
|
||||||
|
|
||||||
GivenHasStackFrame(false);
|
|
||||||
|
|
||||||
Subject.Check();
|
|
||||||
|
|
||||||
ExceptionVerification.ExpectedWarns(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void should_return_ok_if_debug()
|
|
||||||
{
|
|
||||||
MonoOnly();
|
|
||||||
|
|
||||||
GivenHasStackFrame(true);
|
|
||||||
|
|
||||||
Subject.Check().ShouldBeOk();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,68 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using Moq;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using NzbDrone.Common.Processes;
|
|
||||||
using NzbDrone.Core.HealthCheck.Checks;
|
|
||||||
using NzbDrone.Core.Localization;
|
|
||||||
using NzbDrone.Core.Test.Framework;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class MonoNotNetCoreCheckFixture : CoreTest<MonoNotNetCoreCheck>
|
|
||||||
{
|
|
||||||
[SetUp]
|
|
||||||
public void setup()
|
|
||||||
{
|
|
||||||
Mocker.GetMock<ILocalizationService>()
|
|
||||||
.Setup(s => s.GetLocalizedString(It.IsAny<string>()))
|
|
||||||
.Returns("Some Warning Message");
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
[Platform(Exclude = "Mono")]
|
|
||||||
public void should_return_ok_if_net_core()
|
|
||||||
{
|
|
||||||
Subject.Check().ShouldBeOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
[Platform("Mono")]
|
|
||||||
public void should_log_error_if_mono()
|
|
||||||
{
|
|
||||||
Subject.Check().ShouldBeError();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
[Platform("Mono")]
|
|
||||||
public void should_return_error_if_otherbsd()
|
|
||||||
{
|
|
||||||
Mocker.GetMock<IProcessProvider>()
|
|
||||||
.Setup(x => x.StartAndCapture("uname", null, null))
|
|
||||||
.Returns(new ProcessOutput
|
|
||||||
{
|
|
||||||
Lines = new List<ProcessOutputLine>
|
|
||||||
{
|
|
||||||
new ProcessOutputLine(ProcessOutputLevel.Standard, "OpenBSD")
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Subject.Check().ShouldBeError();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
[Platform("Mono")]
|
|
||||||
public void should_log_error_if_freebsd()
|
|
||||||
{
|
|
||||||
Mocker.GetMock<IProcessProvider>()
|
|
||||||
.Setup(x => x.StartAndCapture("uname", null, null))
|
|
||||||
.Returns(new ProcessOutput
|
|
||||||
{
|
|
||||||
Lines = new List<ProcessOutputLine>
|
|
||||||
{
|
|
||||||
new ProcessOutputLine(ProcessOutputLevel.Standard, "FreeBSD")
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Subject.Check().ShouldBeError();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,82 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Moq;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
|
||||||
using NzbDrone.Core.HealthCheck.Checks;
|
|
||||||
using NzbDrone.Core.Localization;
|
|
||||||
using NzbDrone.Core.Test.Framework;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|
||||||
{
|
|
||||||
[TestFixture]
|
|
||||||
public class MonoVersionCheckFixture : CoreTest<MonoVersionCheck>
|
|
||||||
{
|
|
||||||
[SetUp]
|
|
||||||
public void Setup()
|
|
||||||
{
|
|
||||||
Mocker.GetMock<ILocalizationService>()
|
|
||||||
.Setup(s => s.GetLocalizedString(It.IsAny<string>()))
|
|
||||||
.Returns("Some Warning Message");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void GivenOutput(string version)
|
|
||||||
{
|
|
||||||
MonoOnly();
|
|
||||||
|
|
||||||
Mocker.GetMock<IPlatformInfo>()
|
|
||||||
.SetupGet(s => s.Version)
|
|
||||||
.Returns(new Version(version));
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestCase("5.20")]
|
|
||||||
[TestCase("6.4")]
|
|
||||||
[TestCase("6.12")]
|
|
||||||
public void should_return_ok(string version)
|
|
||||||
{
|
|
||||||
GivenOutput(version);
|
|
||||||
|
|
||||||
Subject.Check().ShouldBeOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void should_return_notice(string version)
|
|
||||||
{
|
|
||||||
GivenOutput(version);
|
|
||||||
|
|
||||||
Subject.Check().ShouldBeNotice();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void should_return_warning(string version)
|
|
||||||
{
|
|
||||||
GivenOutput(version);
|
|
||||||
|
|
||||||
Subject.Check().ShouldBeWarning();
|
|
||||||
}
|
|
||||||
|
|
||||||
[TestCase("2.10.2")]
|
|
||||||
[TestCase("2.10.8.1")]
|
|
||||||
[TestCase("3.0.0.1")]
|
|
||||||
[TestCase("3.2.0.1")]
|
|
||||||
[TestCase("3.2.1")]
|
|
||||||
[TestCase("3.2.7")]
|
|
||||||
[TestCase("3.6.1")]
|
|
||||||
[TestCase("3.8")]
|
|
||||||
[TestCase("3.10")]
|
|
||||||
[TestCase("4.0.0.0")]
|
|
||||||
[TestCase("4.2")]
|
|
||||||
[TestCase("4.4.0")]
|
|
||||||
[TestCase("4.4.1")]
|
|
||||||
[TestCase("5.4")]
|
|
||||||
[TestCase("5.8")]
|
|
||||||
[TestCase("5.10")]
|
|
||||||
[TestCase("5.12")]
|
|
||||||
[TestCase("5.14")]
|
|
||||||
[TestCase("5.16")]
|
|
||||||
[TestCase("5.18")]
|
|
||||||
public void should_return_error(string version)
|
|
||||||
{
|
|
||||||
GivenOutput(version);
|
|
||||||
|
|
||||||
Subject.Check().ShouldBeError();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
using System.Diagnostics;
|
|
||||||
using NLog;
|
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
|
||||||
using NzbDrone.Common.Extensions;
|
|
||||||
using NzbDrone.Core.Localization;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.HealthCheck.Checks
|
|
||||||
{
|
|
||||||
public class MonoDebugCheck : HealthCheckBase
|
|
||||||
{
|
|
||||||
private readonly Logger _logger;
|
|
||||||
private readonly StackFrameHelper _stackFrameHelper;
|
|
||||||
|
|
||||||
public override bool CheckOnSchedule => false;
|
|
||||||
|
|
||||||
public MonoDebugCheck(Logger logger, StackFrameHelper stackFrameHelper, ILocalizationService localizationService)
|
|
||||||
: base(localizationService)
|
|
||||||
{
|
|
||||||
_logger = logger;
|
|
||||||
_stackFrameHelper = stackFrameHelper;
|
|
||||||
}
|
|
||||||
|
|
||||||
public class StackFrameHelper
|
|
||||||
{
|
|
||||||
public virtual bool HasStackFrameInfo()
|
|
||||||
{
|
|
||||||
var stackTrace = new StackTrace(true);
|
|
||||||
|
|
||||||
return stackTrace.FrameCount > 0 && stackTrace.GetFrame(0).GetFileName().IsNotNullOrWhiteSpace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override HealthCheck Check()
|
|
||||||
{
|
|
||||||
if (!PlatformInfo.IsMono)
|
|
||||||
{
|
|
||||||
return new HealthCheck(GetType());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_stackFrameHelper.HasStackFrameInfo())
|
|
||||||
{
|
|
||||||
_logger.Warn("Mono is not running with --debug switch");
|
|
||||||
return new HealthCheck(GetType());
|
|
||||||
}
|
|
||||||
|
|
||||||
return new HealthCheck(GetType());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,49 +0,0 @@
|
|||||||
using System.Linq;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
|
||||||
using NzbDrone.Common.Processes;
|
|
||||||
using NzbDrone.Core.Localization;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.HealthCheck.Checks
|
|
||||||
{
|
|
||||||
public class MonoNotNetCoreCheck : HealthCheckBase
|
|
||||||
{
|
|
||||||
private static string[] MonoUnames = new string[] { "OpenBSD", "MidnightBSD", "NetBSD" };
|
|
||||||
private readonly IProcessProvider _processProvider;
|
|
||||||
|
|
||||||
public MonoNotNetCoreCheck(IProcessProvider processProvider,
|
|
||||||
ILocalizationService localizationService)
|
|
||||||
: base(localizationService)
|
|
||||||
{
|
|
||||||
_processProvider = processProvider;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override HealthCheck Check()
|
|
||||||
{
|
|
||||||
if (!PlatformInfo.IsMono)
|
|
||||||
{
|
|
||||||
return new HealthCheck(GetType());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't warn on linux x86 - we don't build x86 net core
|
|
||||||
if (OsInfo.IsLinux && RuntimeInformation.ProcessArchitecture == Architecture.X86)
|
|
||||||
{
|
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, _localizationService.GetLocalizedString("Monox86SupportCheckMessage"), "#mono-support-end-of-life");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for BSD
|
|
||||||
var output = _processProvider.StartAndCapture("uname");
|
|
||||||
if (output?.ExitCode == 0 && MonoUnames.Contains(output?.Lines.First().Content))
|
|
||||||
{
|
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Error, string.Format(_localizationService.GetLocalizedString("MonoBSDSupportCheckMessage"), OsInfo.Os), "#mono-support-end-of-life");
|
|
||||||
}
|
|
||||||
|
|
||||||
return new HealthCheck(GetType(),
|
|
||||||
HealthCheckResult.Error,
|
|
||||||
_localizationService.GetLocalizedString("MonoNotNetCoreCheckMessage"),
|
|
||||||
"#update-to-net-core-version");
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CheckOnSchedule => false;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
using System;
|
|
||||||
using NLog;
|
|
||||||
using NLog.Fluent;
|
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
|
||||||
using NzbDrone.Common.Instrumentation.Extensions;
|
|
||||||
using NzbDrone.Core.Localization;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.HealthCheck.Checks
|
|
||||||
{
|
|
||||||
public class MonoTlsCheck : HealthCheckBase
|
|
||||||
{
|
|
||||||
private readonly IPlatformInfo _platformInfo;
|
|
||||||
private readonly Logger _logger;
|
|
||||||
|
|
||||||
public MonoTlsCheck(IPlatformInfo platformInfo, ILocalizationService localizationService, Logger logger)
|
|
||||||
: base(localizationService)
|
|
||||||
{
|
|
||||||
_platformInfo = platformInfo;
|
|
||||||
_logger = logger;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override HealthCheck Check()
|
|
||||||
{
|
|
||||||
if (!PlatformInfo.IsMono)
|
|
||||||
{
|
|
||||||
return new HealthCheck(GetType());
|
|
||||||
}
|
|
||||||
|
|
||||||
var monoVersion = _platformInfo.Version;
|
|
||||||
|
|
||||||
if (monoVersion >= new Version("5.8.0") && Environment.GetEnvironmentVariable("MONO_TLS_PROVIDER") == "legacy")
|
|
||||||
{
|
|
||||||
_logger.Debug()
|
|
||||||
.Message("Mono version {0} and legacy TLS provider is selected, recommending user to switch to btls.", monoVersion)
|
|
||||||
.WriteSentryDebug("LegacyTlsProvider", monoVersion.ToString())
|
|
||||||
.Write();
|
|
||||||
|
|
||||||
return new HealthCheck(GetType(), HealthCheckResult.Warning, _localizationService.GetLocalizedString("MonoTlsCheckMessage"), "#mono-tls-legacy");
|
|
||||||
}
|
|
||||||
|
|
||||||
return new HealthCheck(GetType());
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CheckOnSchedule => false;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,66 +0,0 @@
|
|||||||
using System;
|
|
||||||
using NLog;
|
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
|
||||||
using NzbDrone.Core.Localization;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.HealthCheck.Checks
|
|
||||||
{
|
|
||||||
public class MonoVersionCheck : HealthCheckBase
|
|
||||||
{
|
|
||||||
private readonly IPlatformInfo _platformInfo;
|
|
||||||
private readonly Logger _logger;
|
|
||||||
|
|
||||||
public MonoVersionCheck(IPlatformInfo platformInfo, ILocalizationService localizationService, Logger logger)
|
|
||||||
: base(localizationService)
|
|
||||||
{
|
|
||||||
_platformInfo = platformInfo;
|
|
||||||
_logger = logger;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override HealthCheck Check()
|
|
||||||
{
|
|
||||||
if (!PlatformInfo.IsMono)
|
|
||||||
{
|
|
||||||
return new HealthCheck(GetType());
|
|
||||||
}
|
|
||||||
|
|
||||||
var monoVersion = _platformInfo.Version;
|
|
||||||
|
|
||||||
// Currently best stable Mono version (5.18 gets us .net 4.7.2 support)
|
|
||||||
var bestVersion = new Version("5.20");
|
|
||||||
var targetVersion = new Version("5.20");
|
|
||||||
if (monoVersion >= targetVersion)
|
|
||||||
{
|
|
||||||
_logger.Debug("Mono version is {0} or better: {1}", targetVersion, monoVersion);
|
|
||||||
return new HealthCheck(GetType());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stable Mono versions
|
|
||||||
var stableVersion = new Version("5.20");
|
|
||||||
if (monoVersion >= stableVersion)
|
|
||||||
{
|
|
||||||
_logger.Debug("Mono version is {0} or better: {1}", stableVersion, monoVersion);
|
|
||||||
return new HealthCheck(GetType(),
|
|
||||||
HealthCheckResult.Notice,
|
|
||||||
string.Format(_localizationService.GetLocalizedString("MonoVersionCheckUpgradeRecommendedMessage"), monoVersion, bestVersion),
|
|
||||||
"#currently-installed-mono-version-is-supported-but-upgrading-is-recommended");
|
|
||||||
}
|
|
||||||
|
|
||||||
var oldVersion = new Version("5.20");
|
|
||||||
if (monoVersion >= oldVersion)
|
|
||||||
{
|
|
||||||
return new HealthCheck(GetType(),
|
|
||||||
HealthCheckResult.Error,
|
|
||||||
string.Format(_localizationService.GetLocalizedString("MonoVersionCheckUpgradeRecommendedMessage"), monoVersion, bestVersion),
|
|
||||||
"#currently-installed-mono-version-is-old-and-unsupported");
|
|
||||||
}
|
|
||||||
|
|
||||||
return new HealthCheck(GetType(),
|
|
||||||
HealthCheckResult.Error,
|
|
||||||
string.Format(_localizationService.GetLocalizedString("MonoVersionCheckUpgradeRecommendedMessage"), monoVersion, bestVersion),
|
|
||||||
"#currently-installed-mono-version-is-old-and-unsupported");
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CheckOnSchedule => false;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +1,9 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net5.0;net472</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NzbDrone.Host\Radarr.Host.csproj" />
|
<ProjectReference Include="..\NzbDrone.Host\Radarr.Host.csproj" />
|
||||||
<ProjectReference Include="..\NzbDrone.Test.Common\Radarr.Test.Common.csproj" />
|
<ProjectReference Include="..\NzbDrone.Test.Common\Radarr.Test.Common.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
|
|
||||||
<Reference Include="System.ServiceProcess" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFrameworks>net5.0;net472</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
@ -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>
|
|
@ -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>
|
|
Loading…
Reference in new issue