New: Drop mono support

pull/838/head
ta264 3 years ago
parent 760de88e7c
commit fb130fd0e9

@ -107,10 +107,6 @@ stages:
artifact: WindowsCoreTests
displayName: Publish Windows Test Package
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
- publish: '$(testsFolder)/net462/linux-x64/publish'
artifact: LinuxTests
displayName: Publish Linux Mono Test Package
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
- publish: '$(testsFolder)/net5.0/linux-x64/publish'
artifact: LinuxCoreTests
displayName: Publish Linux Test Package
@ -270,14 +266,6 @@ stages:
tarCompression: 'gz'
includeRootFolder: false
rootFolderOrFile: $(artifactsFolder)/macos/net5.0
- task: ArchiveFiles@2
displayName: Create Linux Mono tar
inputs:
archiveFile: '$(Build.ArtifactStagingDirectory)/Readarr.$(buildName).linux.tar.gz'
archiveType: 'tar'
tarCompression: 'gz'
includeRootFolder: false
rootFolderOrFile: $(artifactsFolder)/linux-x64/net462
- task: ArchiveFiles@2
displayName: Create Linux Core tar
inputs:
@ -422,20 +410,9 @@ stages:
displayName: Enable Windows Test Service
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
- bash: |
wget https://github.com/acoustid/chromaprint/releases/download/v1.4.3/chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz
sudo tar xf chromaprint-fpcalc-1.4.3-linux-x86_64.tar.gz --strip-components=1 --directory /usr/bin
chmod a+x _tests/fpcalc
displayName: Install fpcalc
condition: and(succeeded(), eq(variables['osName'], 'Linux'))
- bash: |
SYMLINK=6_6_0
MONOPREFIX=/Library/Frameworks/Mono.framework/Versions/$SYMLINK
echo "##vso[task.setvariable variable=MONOPREFIX;]$MONOPREFIX"
echo "##vso[task.setvariable variable=PKG_CONFIG_PATH;]$MONOPREFIX/lib/pkgconfig:$MONOPREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
echo "##vso[task.setvariable variable=PATH;]$MONOPREFIX/bin:$PATH"
chmod a+x _tests/fpcalc
displayName: Set Mono Version and make fpcalc Executable
condition: and(succeeded(), eq(variables['osName'], 'Mac'))
displayName: Make fpcalc Executable
condition: and(succeeded(), or(eq(variables['osName'], 'Mac'), eq(variables['testName'], 'LinuxCore')))
- bash: find ${TESTSFOLDER} -name "Readarr.Test.Dummy" -exec chmod a+x {} \;
displayName: Make Test Dummy Executable
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
@ -459,18 +436,6 @@ stages:
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
strategy:
matrix:
mono520:
testName: 'Mono 5.20'
artifactName: LinuxTests
containerImage: ghcr.io/servarr/testimages:mono-5.20
mono610:
testName: 'Mono 6.10'
artifactName: LinuxTests
containerImage: ghcr.io/servarr/testimages:mono-6.10
mono612:
testName: 'Mono 6.12'
artifactName: LinuxTests
containerImage: ghcr.io/servarr/testimages:mono-6.12
alpine:
testName: 'Musl Net Core'
artifactName: LinuxMuslCoreTests
@ -554,14 +519,6 @@ stages:
vmImage: $(imageName)
steps:
- bash: |
SYMLINK=6_6_0
MONOPREFIX=/Library/Frameworks/Mono.framework/Versions/$SYMLINK
echo "##vso[task.setvariable variable=MONOPREFIX;]$MONOPREFIX"
echo "##vso[task.setvariable variable=PKG_CONFIG_PATH;]$MONOPREFIX/lib/pkgconfig:$MONOPREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
echo "##vso[task.setvariable variable=PATH;]$MONOPREFIX/bin:$PATH"
displayName: Set Mono Version
condition: and(succeeded(), eq(variables['osName'], 'Mac'))
- task: UseDotNet@2
displayName: 'Install .net core'
inputs:
@ -653,21 +610,6 @@ stages:
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
strategy:
matrix:
mono520:
testName: 'Mono 5.20'
artifactName: LinuxTests
containerImage: ghcr.io/servarr/testimages:mono-5.20
pattern: 'Readarr.*.linux.tar.gz'
mono610:
testName: 'Mono 6.10'
artifactName: LinuxTests
containerImage: ghcr.io/servarr/testimages:mono-6.10
pattern: 'Readarr.*.linux.tar.gz'
mono612:
testName: 'Mono 6.12'
artifactName: LinuxTests
containerImage: ghcr.io/servarr/testimages:mono-6.12
pattern: 'Readarr.*.linux.tar.gz'
alpine:
testName: 'Musl Net Core'
artifactName: LinuxMuslCoreTests

@ -150,11 +150,6 @@ PackageMacOS()
PackageFiles "$folder" "$framework" "osx-x64"
if [ "$framework" = "net462" ]; then
echo "Adding Startup script"
cp macOS/Readarr $folder
fi
echo "Removing Service helpers"
rm -f $folder/ServiceUninstall.*
rm -f $folder/ServiceInstall.*
@ -339,7 +334,6 @@ then
PackageTests "net5.0" "linux-x64"
PackageTests "net5.0" "linux-musl-x64"
PackageTests "net5.0" "osx-x64"
PackageTests "net462" "linux-x64"
if [ "$ENABLE_BSD" = "YES" ];
then
PackageTests "net5.0" "freebsd-x64"
@ -379,7 +373,6 @@ then
Package "net5.0" "linux-musl-arm64"
Package "net5.0" "linux-arm"
Package "net5.0" "osx-x64"
Package "net462" "linux-x64"
if [ "$ENABLE_BSD" = "YES" ];
then
Package "net5.0" "freebsd-x64"

@ -1,62 +0,0 @@
#!/bin/sh
#get the bundle's MacOS directory full path
DIR=$(cd "$(dirname "$0")"; pwd)
#change these values to match your app
EXE_PATH="$DIR/Readarr.exe"
APPNAME="Readarr"
#set up environment
if [[ -x '/opt/local/bin/mono' ]]; then
# Macports and mono-supplied installer path
export PATH="/opt/local/bin:$PATH"
elif [[ -x '/usr/local/bin/mono' ]]; then
# Homebrew-supplied path to mono
export PATH="/usr/local/bin:$PATH"
fi
export DYLD_FALLBACK_LIBRARY_PATH="$DIR"
if [ -e /Library/Frameworks/Mono.framework ]; then
MONO_FRAMEWORK_PATH=/Library/Frameworks/Mono.framework/Versions/Current
export PATH="$MONO_FRAMEWORK_PATH/bin:$PATH"
export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$MONO_FRAMEWORK_PATH/lib"
fi
if [[ -f '/opt/local/lib/libsqlite3.0.dylib' ]]; then
export DYLD_FALLBACK_LIBRARY_PATH="/opt/local/lib:$DYLD_FALLBACK_LIBRARY_PATH"
fi
export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:$HOME/lib:/usr/local/lib:/lib:/usr/lib"
#mono version check
REQUIRED_MAJOR=4
REQUIRED_MINOR=6
VERSION_TITLE="Cannot launch $APPNAME"
VERSION_MSG="$APPNAME requires Mono Runtime Environment(MRE) $REQUIRED_MAJOR.$REQUIRED_MINOR or later."
DOWNLOAD_URL="http://www.mono-project.com/download/#download-mac"
MONO_VERSION="$(mono --version | grep 'Mono JIT compiler version ' | cut -f5 -d\ )"
# if [[ -o DEBUG ]]; then osascript -e "display dialog \"MONO_VERSION: $MONO_VERSION\""; fi
MONO_VERSION_MAJOR="$(echo $MONO_VERSION | cut -f1 -d.)"
MONO_VERSION_MINOR="$(echo $MONO_VERSION | cut -f2 -d.)"
if [ -z "$MONO_VERSION" ] \
|| [ $MONO_VERSION_MAJOR -lt $REQUIRED_MAJOR ] \
|| [ $MONO_VERSION_MAJOR -eq $REQUIRED_MAJOR -a $MONO_VERSION_MINOR -lt $REQUIRED_MINOR ]
then
osascript \
-e "set question to display dialog \"$VERSION_MSG\" with title \"$VERSION_TITLE\" buttons {\"Cancel\", \"Download...\"} default button 2" \
-e "if button returned of question is equal to \"Download...\" then open location \"$DOWNLOAD_URL\""
echo "$VERSION_TITLE"
echo "$VERSION_MSG"
exit 1
fi
MONO_EXEC="exec mono --debug"
#run app using mono
$MONO_EXEC "$EXE_PATH"

@ -6,7 +6,6 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<RuntimeIdentifiers>win-x64;win-x86;osx-x64;linux-x64;linux-musl-x64;linux-arm;linux-arm64;linux-musl-arm64</RuntimeIdentifiers>
<ExcludedRuntimeFrameworkPairs>win-x64:net462;win-x86:net462;osx-x64:net462;linux-arm:net462;linux-arm64:net462;linux-musl-x64:net462;linux-musl-arm64:net462</ExcludedRuntimeFrameworkPairs>
<ReadarrRootDir>$(MSBuildThisFileDirectory)..\</ReadarrRootDir>
@ -83,14 +82,6 @@
<RootNamespace Condition="'$(ReadarrProject)'=='true'">$(MSBuildProjectName.Replace('Readarr','NzbDrone'))</RootNamespace>
</PropertyGroup>
<!-- Allow building net framework using mono -->
<ItemGroup>
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- Set up stylecop -->
<ItemGroup Condition="'$(ReadarrProject)'=='true' and '$(EnableAnalyzers)'!='false'">
<!-- StyleCop analysis -->

@ -1,9 +1,4 @@
<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)' == 'net462'">
<DebugType>full</DebugType>
</PropertyGroup>
<Import Project="Targets/PublishAllRids.targets" />
<Import Project="Targets/FixBindingRedirects.targets" />
<Import Project="Targets/MonoFacades.targets" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and !$(RuntimeIdentifier.StartsWith('win'))" />

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
@ -10,8 +10,6 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="coverlet.collector" Version="1.3.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
@ -19,7 +17,4 @@
<ProjectReference Include="..\NzbDrone.Test.Common\Readarr.Test.Common.csproj" />
<ProjectReference Include="..\NzbDrone.Test.Dummy\Readarr.Test.Dummy.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.ServiceProcess" />
</ItemGroup>
</Project>

@ -1,17 +1,14 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Loader;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Messaging;
using TinyIoC;
#if NETCOREAPP
using System.IO;
using System.Runtime.InteropServices;
using System.Runtime.Loader;
#endif
namespace NzbDrone.Common.Composition
{
public abstract class ContainerBuilderBase
@ -27,12 +24,6 @@ namespace NzbDrone.Common.Composition
assemblies.Add(OsInfo.IsWindows ? "Readarr.Windows" : "Readarr.Mono");
assemblies.Add("Readarr.Common");
#if !NETCOREAPP
foreach (var assembly in assemblies)
{
_loadedTypes.AddRange(Assembly.Load(assembly).GetTypes());
}
#else
var startupPath = AppDomain.CurrentDomain.BaseDirectory;
foreach (var assemblyName in assemblies)
@ -42,14 +33,12 @@ namespace NzbDrone.Common.Composition
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(ContainerResolveEventHandler);
RegisterSQLiteResolver();
#endif
Container = new Container(new TinyIoCContainer(), _loadedTypes);
AutoRegisterInterfaces();
Container.Register(args);
}
#if NETCOREAPP
private static Assembly ContainerResolveEventHandler(object sender, ResolveEventArgs args)
{
var resolver = new AssemblyDependencyResolver(args.RequestingAssembly.Location);
@ -86,7 +75,6 @@ namespace NzbDrone.Common.Composition
var mappedName = OsInfo.IsLinux && libraryName == "sqlite3" ? "libsqlite3.so.0" : libraryName;
return NativeLibrary.Load(mappedName, assembly, dllImportSearchPath);
}
#endif
private void AutoRegisterInterfaces()
{

@ -26,21 +26,8 @@ namespace NzbDrone.Common.EnvironmentInfo
static PlatformInfo()
{
#if NETCOREAPP
_platform = PlatformType.NetCore;
_version = Environment.Version;
#else
if (Type.GetType("Mono.Runtime") != null)
{
_platform = PlatformType.Mono;
_version = GetMonoVersion();
}
else
{
_platform = PlatformType.DotNet;
_version = GetDotNetVersion();
}
#endif
}
public static PlatformType Platform => _platform;

@ -6,14 +6,6 @@ namespace NzbDrone.Common.Extensions
{
public static class DictionaryExtensions
{
#if !NETCOREAPP
public static TValue GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue = default(TValue))
{
TValue value;
return dictionary.TryGetValue(key, out value) ? value : defaultValue;
}
#endif
public static Dictionary<T1, T2> Merge<T1, T2>(this Dictionary<T1, T2> first, Dictionary<T1, T2> second)
{
if (first == null)

@ -44,11 +44,7 @@ namespace NzbDrone.Common.Processes
public static int GetCurrentProcessId()
{
#if NETCOREAPP
return Environment.ProcessId;
#else
return Process.GetCurrentProcess().Id;
#endif
}
public ProcessInfo GetCurrentProcess()

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
<NeutralLanguage>en</NeutralLanguage>
<DefineConstants Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64' or '$(RuntimeIdentifier)' == 'linux-musl-arm64'">ISMUSL</DefineConstants>
</PropertyGroup>
@ -14,16 +14,11 @@
<PackageReference Include="System.Text.Json" Version="5.0.1" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.Data.SQLite.Core.Servarr" Version="1.0.113.0-0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.ServiceProcess" />
</ItemGroup>
<ItemGroup>
<Compile Update="EnsureThat\Resources\ExceptionMessages.Designer.cs">
<DesignTime>True</DesignTime>

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
<ApplicationIcon>..\NzbDrone.Host\Readarr.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.78" />
@ -26,10 +26,6 @@
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Common\Readarr.Common.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\Logo\64.png">
<Link>Resources\Logo\64.png</Link>

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
@ -10,15 +10,10 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="coverlet.collector" Version="1.3.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Host\Readarr.Host.csproj" />
<ProjectReference Include="..\NzbDrone.Test.Common\Readarr.Test.Common.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.ServiceProcess" />
</ItemGroup>
</Project>

@ -1,18 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
<OutputType>Library</OutputType>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.7" />
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Owin" Version="2.2.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.AspNetCore.Owin" Version="5.0.3" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Owin" Version="5.0.3" />
<PackageReference Include="NLog.Extensions.Logging" Version="1.6.4" />
</ItemGroup>
<ItemGroup>
@ -28,7 +20,4 @@
<EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.ServiceProcess" />
</ItemGroup>
</Project>

@ -55,17 +55,10 @@ namespace NzbDrone.Host.Middleware
}
});
#if NETCOREAPP
appBuilder.UseEndpoints(x =>
{
x.MapHub<MessageHub>(URL_BASE + "/signalr/messages");
});
#else
appBuilder.UseSignalR(x =>
{
x.MapHub<MessageHub>("/signalr/messages");
});
#endif
// This is a side effect of haing multiple IoC containers, TinyIoC and whatever
// Kestrel/SignalR is using. Ideally we'd have one IoC container, but that's non-trivial with TinyIoC

@ -90,23 +90,14 @@ namespace NzbDrone.Host
{
services
.AddSignalR()
#if !NETCOREAPP
.AddJsonProtocol(options =>
{
options.PayloadSerializerSettings = Json.GetSerializerSettings();
});
#else
.AddJsonProtocol(options =>
{
options.PayloadSerializerOptions = STJson.GetSerializerSettings();
});
#endif
})
.Configure(app =>
{
#if NETCOREAPP
app.UseRouting();
#endif
app.Properties["host.AppName"] = BuildInfo.AppName;
app.UsePathBase(_configFileProvider.UrlBase);

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
<OutputType>Library</OutputType>
</PropertyGroup>
<ItemGroup>
@ -11,11 +11,6 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="1.1.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="5.0.3" />
</ItemGroup>
<ItemGroup>

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
@ -10,16 +10,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Mono.Posix-4.5" Version="4.5.0" PrivateAssets="all" />
</ItemGroup>
<!--
The netstandard veresion here doesn't work in net framework
See https://github.com/xamarin/XamarinComponents/issues/282
-->
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Mono.Posix.NETStandard" Version="5.20.1-preview" />
<PackageReference Include="Mono.Posix.NETStandard" Version="5.20.1-servarr1" />
<PackageReference Include="coverlet.collector" Version="1.3.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>

@ -1,19 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NLog" Version="4.7.2" />
<PackageReference Include="System.IO.Abstractions" Version="12.0.4" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Mono.Posix-4.5" Version="4.5.0" PrivateAssets="all" />
</ItemGroup>
<!--
The netstandard veresion here doesn't work in net framework
See https://github.com/xamarin/XamarinComponents/issues/282
-->
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Mono.Posix.NETStandard" Version="5.20.1-servarr1" />
</ItemGroup>
<ItemGroup>

@ -1,12 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
<OutputType>Library</OutputType>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Core\Readarr.Core.csproj" />
</ItemGroup>

@ -7,11 +7,7 @@ namespace NzbDrone.SignalR
public object Body { get; set; }
public string Name { get; set; }
#if !NETCOREAPP
[Newtonsoft.Json.JsonIgnore]
#else
[System.Text.Json.Serialization.JsonIgnore]
#endif
public ModelAction Action { get; set; }
}
}

@ -164,9 +164,7 @@ namespace NzbDrone.Test.Common.AutoMoq
RegisterPlatformLibrary(container);
AddTheAutoMockingContainerExtensionToTheContainer(container);
#if NETCOREAPP
ContainerBuilderBase.RegisterSQLiteResolver();
#endif
}
private static void AddTheAutoMockingContainerExtensionToTheContainer(IUnityContainer container)

@ -57,8 +57,7 @@ namespace NzbDrone.Test.Common
_startupLog = new List<string>();
if (BuildInfo.IsDebug)
{
var frameworkFolder = PlatformInfo.IsNetCore ? "net5.0" : "net462";
Start(Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "_output", frameworkFolder, readarrConsoleExe));
Start(Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "_output", "net5.0", readarrConsoleExe));
}
else
{

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
</Project>

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NLog" Version="4.7.2" />

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NLog" Version="4.7.2" />

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net462;net5.0-windows</TargetFrameworks>
<TargetFrameworks>net5.0-windows</TargetFrameworks>
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>
<UseWindowsForms>true</UseWindowsForms>
<ApplicationIcon>..\NzbDrone.Host\Readarr.ico</ApplicationIcon>
@ -14,9 +14,6 @@
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Host\Readarr.Host.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Readarr.Http\Readarr.Http.csproj" />

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentValidation" Version="8.6.2" />

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0" />

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net462;net5.0</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0" />

@ -21,8 +21,6 @@
<Framework>%(Framework)</Framework>
</Renamed>
<Renamed Remove="$(ExcludedRuntimeFrameworkPairs)" />
<!-- Transform RuntimeIdentifierForPublish items to project items to pass to MSBuild task -->
<ProjectToPublish Include="@(Renamed->'$(MSBuildProjectFullPath)')">
<AdditionalProperties>RuntimeIdentifier=%(Renamed.Runtime);TargetFramework=%(Renamed.Framework)</AdditionalProperties>

Loading…
Cancel
Save