mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-22 09:29:59 +00:00
New: Drop mono support
This commit is contained in:
@@ -107,10 +107,6 @@ stages:
|
|||||||
artifact: WindowsCoreTests
|
artifact: WindowsCoreTests
|
||||||
displayName: Publish Windows Test Package
|
displayName: Publish Windows Test Package
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
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'
|
- publish: '$(testsFolder)/net5.0/linux-x64/publish'
|
||||||
artifact: LinuxCoreTests
|
artifact: LinuxCoreTests
|
||||||
displayName: Publish Linux Test Package
|
displayName: Publish Linux Test Package
|
||||||
@@ -270,14 +266,6 @@ stages:
|
|||||||
tarCompression: 'gz'
|
tarCompression: 'gz'
|
||||||
includeRootFolder: false
|
includeRootFolder: false
|
||||||
rootFolderOrFile: $(artifactsFolder)/macos/net5.0
|
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
|
- task: ArchiveFiles@2
|
||||||
displayName: Create Linux Core tar
|
displayName: Create Linux Core tar
|
||||||
inputs:
|
inputs:
|
||||||
@@ -422,20 +410,9 @@ stages:
|
|||||||
displayName: Enable Windows Test Service
|
displayName: Enable Windows Test Service
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
condition: and(succeeded(), eq(variables['osName'], 'Windows'))
|
||||||
- bash: |
|
- 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
|
chmod a+x _tests/fpcalc
|
||||||
displayName: Install fpcalc
|
displayName: Make fpcalc Executable
|
||||||
condition: and(succeeded(), eq(variables['osName'], 'Linux'))
|
condition: and(succeeded(), or(eq(variables['osName'], 'Mac'), eq(variables['testName'], 'LinuxCore')))
|
||||||
- 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'))
|
|
||||||
- bash: find ${TESTSFOLDER} -name "Readarr.Test.Dummy" -exec chmod a+x {} \;
|
- bash: find ${TESTSFOLDER} -name "Readarr.Test.Dummy" -exec chmod a+x {} \;
|
||||||
displayName: Make Test Dummy Executable
|
displayName: Make Test Dummy Executable
|
||||||
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
condition: and(succeeded(), ne(variables['osName'], 'Windows'))
|
||||||
@@ -459,18 +436,6 @@ stages:
|
|||||||
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
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:
|
alpine:
|
||||||
testName: 'Musl Net Core'
|
testName: 'Musl Net Core'
|
||||||
artifactName: LinuxMuslCoreTests
|
artifactName: LinuxMuslCoreTests
|
||||||
@@ -554,14 +519,6 @@ stages:
|
|||||||
vmImage: $(imageName)
|
vmImage: $(imageName)
|
||||||
|
|
||||||
steps:
|
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
|
- task: UseDotNet@2
|
||||||
displayName: 'Install .net core'
|
displayName: 'Install .net core'
|
||||||
inputs:
|
inputs:
|
||||||
@@ -653,21 +610,6 @@ stages:
|
|||||||
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
condition: and(succeeded(), eq(dependencies.Prepare.outputs['setVar.backendNotUpdated'], '0'))
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
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:
|
alpine:
|
||||||
testName: 'Musl Net Core'
|
testName: 'Musl Net Core'
|
||||||
artifactName: LinuxMuslCoreTests
|
artifactName: LinuxMuslCoreTests
|
||||||
|
|||||||
7
build.sh
7
build.sh
@@ -150,11 +150,6 @@ PackageMacOS()
|
|||||||
|
|
||||||
PackageFiles "$folder" "$framework" "osx-x64"
|
PackageFiles "$folder" "$framework" "osx-x64"
|
||||||
|
|
||||||
if [ "$framework" = "net462" ]; then
|
|
||||||
echo "Adding Startup script"
|
|
||||||
cp macOS/Readarr $folder
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Removing Service helpers"
|
echo "Removing Service helpers"
|
||||||
rm -f $folder/ServiceUninstall.*
|
rm -f $folder/ServiceUninstall.*
|
||||||
rm -f $folder/ServiceInstall.*
|
rm -f $folder/ServiceInstall.*
|
||||||
@@ -339,7 +334,6 @@ then
|
|||||||
PackageTests "net5.0" "linux-x64"
|
PackageTests "net5.0" "linux-x64"
|
||||||
PackageTests "net5.0" "linux-musl-x64"
|
PackageTests "net5.0" "linux-musl-x64"
|
||||||
PackageTests "net5.0" "osx-x64"
|
PackageTests "net5.0" "osx-x64"
|
||||||
PackageTests "net462" "linux-x64"
|
|
||||||
if [ "$ENABLE_BSD" = "YES" ];
|
if [ "$ENABLE_BSD" = "YES" ];
|
||||||
then
|
then
|
||||||
PackageTests "net5.0" "freebsd-x64"
|
PackageTests "net5.0" "freebsd-x64"
|
||||||
@@ -379,7 +373,6 @@ then
|
|||||||
Package "net5.0" "linux-musl-arm64"
|
Package "net5.0" "linux-musl-arm64"
|
||||||
Package "net5.0" "linux-arm"
|
Package "net5.0" "linux-arm"
|
||||||
Package "net5.0" "osx-x64"
|
Package "net5.0" "osx-x64"
|
||||||
Package "net462" "linux-x64"
|
|
||||||
if [ "$ENABLE_BSD" = "YES" ];
|
if [ "$ENABLE_BSD" = "YES" ];
|
||||||
then
|
then
|
||||||
Package "net5.0" "freebsd-x64"
|
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>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
|
||||||
<RuntimeIdentifiers>win-x64;win-x86;osx-x64;linux-x64;linux-musl-x64;linux-arm;linux-arm64;linux-musl-arm64</RuntimeIdentifiers>
|
<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>
|
<ReadarrRootDir>$(MSBuildThisFileDirectory)..\</ReadarrRootDir>
|
||||||
|
|
||||||
@@ -83,14 +82,6 @@
|
|||||||
<RootNamespace Condition="'$(ReadarrProject)'=='true'">$(MSBuildProjectName.Replace('Readarr','NzbDrone'))</RootNamespace>
|
<RootNamespace Condition="'$(ReadarrProject)'=='true'">$(MSBuildProjectName.Replace('Readarr','NzbDrone'))</RootNamespace>
|
||||||
</PropertyGroup>
|
</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 -->
|
<!-- Set up stylecop -->
|
||||||
<ItemGroup Condition="'$(ReadarrProject)'=='true' and '$(EnableAnalyzers)'!='false'">
|
<ItemGroup Condition="'$(ReadarrProject)'=='true' and '$(EnableAnalyzers)'!='false'">
|
||||||
<!-- StyleCop analysis -->
|
<!-- StyleCop analysis -->
|
||||||
|
|||||||
@@ -1,9 +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)' == 'net462'">
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Import Project="Targets/PublishAllRids.targets" />
|
<Import Project="Targets/PublishAllRids.targets" />
|
||||||
<Import Project="Targets/FixBindingRedirects.targets" />
|
<Import Project="Targets/FixBindingRedirects.targets" />
|
||||||
<Import Project="Targets/MonoFacades.targets" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and !$(RuntimeIdentifier.StartsWith('win'))" />
|
<Import Project="Targets/MonoFacades.targets" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' and !$(RuntimeIdentifier.StartsWith('win'))" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
||||||
@@ -10,8 +10,6 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
|
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
|
|
||||||
<PackageReference Include="coverlet.collector" Version="1.3.0" PrivateAssets="all" />
|
<PackageReference Include="coverlet.collector" Version="1.3.0" PrivateAssets="all" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -19,7 +17,4 @@
|
|||||||
<ProjectReference Include="..\NzbDrone.Test.Common\Readarr.Test.Common.csproj" />
|
<ProjectReference Include="..\NzbDrone.Test.Common\Readarr.Test.Common.csproj" />
|
||||||
<ProjectReference Include="..\NzbDrone.Test.Dummy\Readarr.Test.Dummy.csproj" />
|
<ProjectReference Include="..\NzbDrone.Test.Dummy\Readarr.Test.Dummy.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
|
|
||||||
<Reference Include="System.ServiceProcess" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Runtime.Loader;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Messaging;
|
using NzbDrone.Common.Messaging;
|
||||||
using TinyIoC;
|
using TinyIoC;
|
||||||
|
|
||||||
#if NETCOREAPP
|
|
||||||
using System.IO;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Runtime.Loader;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace NzbDrone.Common.Composition
|
namespace NzbDrone.Common.Composition
|
||||||
{
|
{
|
||||||
public abstract class ContainerBuilderBase
|
public abstract class ContainerBuilderBase
|
||||||
@@ -27,12 +24,6 @@ namespace NzbDrone.Common.Composition
|
|||||||
assemblies.Add(OsInfo.IsWindows ? "Readarr.Windows" : "Readarr.Mono");
|
assemblies.Add(OsInfo.IsWindows ? "Readarr.Windows" : "Readarr.Mono");
|
||||||
assemblies.Add("Readarr.Common");
|
assemblies.Add("Readarr.Common");
|
||||||
|
|
||||||
#if !NETCOREAPP
|
|
||||||
foreach (var assembly in assemblies)
|
|
||||||
{
|
|
||||||
_loadedTypes.AddRange(Assembly.Load(assembly).GetTypes());
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
var startupPath = AppDomain.CurrentDomain.BaseDirectory;
|
var startupPath = AppDomain.CurrentDomain.BaseDirectory;
|
||||||
|
|
||||||
foreach (var assemblyName in assemblies)
|
foreach (var assemblyName in assemblies)
|
||||||
@@ -42,14 +33,12 @@ namespace NzbDrone.Common.Composition
|
|||||||
|
|
||||||
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(ContainerResolveEventHandler);
|
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(ContainerResolveEventHandler);
|
||||||
RegisterSQLiteResolver();
|
RegisterSQLiteResolver();
|
||||||
#endif
|
|
||||||
|
|
||||||
Container = new Container(new TinyIoCContainer(), _loadedTypes);
|
Container = new Container(new TinyIoCContainer(), _loadedTypes);
|
||||||
AutoRegisterInterfaces();
|
AutoRegisterInterfaces();
|
||||||
Container.Register(args);
|
Container.Register(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NETCOREAPP
|
|
||||||
private static Assembly ContainerResolveEventHandler(object sender, ResolveEventArgs args)
|
private static Assembly ContainerResolveEventHandler(object sender, ResolveEventArgs args)
|
||||||
{
|
{
|
||||||
var resolver = new AssemblyDependencyResolver(args.RequestingAssembly.Location);
|
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;
|
var mappedName = OsInfo.IsLinux && libraryName == "sqlite3" ? "libsqlite3.so.0" : libraryName;
|
||||||
return NativeLibrary.Load(mappedName, assembly, dllImportSearchPath);
|
return NativeLibrary.Load(mappedName, assembly, dllImportSearchPath);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
private void AutoRegisterInterfaces()
|
private void AutoRegisterInterfaces()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,21 +26,8 @@ namespace NzbDrone.Common.EnvironmentInfo
|
|||||||
|
|
||||||
static PlatformInfo()
|
static PlatformInfo()
|
||||||
{
|
{
|
||||||
#if NETCOREAPP
|
|
||||||
_platform = PlatformType.NetCore;
|
_platform = PlatformType.NetCore;
|
||||||
_version = Environment.Version;
|
_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;
|
public static PlatformType Platform => _platform;
|
||||||
|
|||||||
@@ -6,14 +6,6 @@ namespace NzbDrone.Common.Extensions
|
|||||||
{
|
{
|
||||||
public static class DictionaryExtensions
|
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)
|
public static Dictionary<T1, T2> Merge<T1, T2>(this Dictionary<T1, T2> first, Dictionary<T1, T2> second)
|
||||||
{
|
{
|
||||||
if (first == null)
|
if (first == null)
|
||||||
|
|||||||
@@ -44,11 +44,7 @@ namespace NzbDrone.Common.Processes
|
|||||||
|
|
||||||
public static int GetCurrentProcessId()
|
public static int GetCurrentProcessId()
|
||||||
{
|
{
|
||||||
#if NETCOREAPP
|
|
||||||
return Environment.ProcessId;
|
return Environment.ProcessId;
|
||||||
#else
|
|
||||||
return Process.GetCurrentProcess().Id;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProcessInfo GetCurrentProcess()
|
public ProcessInfo GetCurrentProcess()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
<NeutralLanguage>en</NeutralLanguage>
|
<NeutralLanguage>en</NeutralLanguage>
|
||||||
<DefineConstants Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64' or '$(RuntimeIdentifier)' == 'linux-musl-arm64'">ISMUSL</DefineConstants>
|
<DefineConstants Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64' or '$(RuntimeIdentifier)' == 'linux-musl-arm64'">ISMUSL</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -14,16 +14,11 @@
|
|||||||
<PackageReference Include="System.Text.Json" Version="5.0.1" />
|
<PackageReference Include="System.Text.Json" Version="5.0.1" />
|
||||||
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
||||||
<PackageReference Include="System.Data.SQLite.Core.Servarr" Version="1.0.113.0-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.Runtime.Loader" Version="4.3.0" />
|
||||||
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
|
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
|
||||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0" />
|
<PackageReference Include="System.ServiceProcess.ServiceController" Version="5.0.0" />
|
||||||
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
|
|
||||||
<Reference Include="System.ServiceProcess" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Update="EnsureThat\Resources\ExceptionMessages.Designer.cs">
|
<Compile Update="EnsureThat\Resources\ExceptionMessages.Designer.cs">
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
|
|
||||||
<ApplicationIcon>..\NzbDrone.Host\Readarr.ico</ApplicationIcon>
|
<ApplicationIcon>..\NzbDrone.Host\Readarr.ico</ApplicationIcon>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Dapper" Version="2.0.78" />
|
<PackageReference Include="Dapper" Version="2.0.78" />
|
||||||
@@ -26,10 +26,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NzbDrone.Common\Readarr.Common.csproj" />
|
<ProjectReference Include="..\NzbDrone.Common\Readarr.Common.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
|
|
||||||
<Reference Include="System.Web" />
|
|
||||||
<Reference Include="System.Web.Extensions" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="..\..\Logo\64.png">
|
<EmbeddedResource Include="..\..\Logo\64.png">
|
||||||
<Link>Resources\Logo\64.png</Link>
|
<Link>Resources\Logo\64.png</Link>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
||||||
@@ -10,15 +10,10 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
|
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
|
|
||||||
<PackageReference Include="coverlet.collector" Version="1.3.0" PrivateAssets="all" />
|
<PackageReference Include="coverlet.collector" Version="1.3.0" PrivateAssets="all" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NzbDrone.Host\Readarr.Host.csproj" />
|
<ProjectReference Include="..\NzbDrone.Host\Readarr.Host.csproj" />
|
||||||
<ProjectReference Include="..\NzbDrone.Test.Common\Readarr.Test.Common.csproj" />
|
<ProjectReference Include="..\NzbDrone.Test.Common\Readarr.Test.Common.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
|
|
||||||
<Reference Include="System.ServiceProcess" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,18 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
</PropertyGroup>
|
</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>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Owin" Version="5.0.3" />
|
||||||
<PackageReference Include="NLog.Extensions.Logging" Version="1.6.4" />
|
<PackageReference Include="NLog.Extensions.Logging" Version="1.6.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -28,7 +20,4 @@
|
|||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
|
|
||||||
<Reference Include="System.ServiceProcess" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -55,17 +55,10 @@ namespace NzbDrone.Host.Middleware
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
#if NETCOREAPP
|
|
||||||
appBuilder.UseEndpoints(x =>
|
appBuilder.UseEndpoints(x =>
|
||||||
{
|
{
|
||||||
x.MapHub<MessageHub>(URL_BASE + "/signalr/messages");
|
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
|
// 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
|
// 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
|
services
|
||||||
.AddSignalR()
|
.AddSignalR()
|
||||||
#if !NETCOREAPP
|
|
||||||
.AddJsonProtocol(options =>
|
|
||||||
{
|
|
||||||
options.PayloadSerializerSettings = Json.GetSerializerSettings();
|
|
||||||
});
|
|
||||||
#else
|
|
||||||
.AddJsonProtocol(options =>
|
.AddJsonProtocol(options =>
|
||||||
{
|
{
|
||||||
options.PayloadSerializerOptions = STJson.GetSerializerSettings();
|
options.PayloadSerializerOptions = STJson.GetSerializerSettings();
|
||||||
});
|
});
|
||||||
#endif
|
|
||||||
})
|
})
|
||||||
.Configure(app =>
|
.Configure(app =>
|
||||||
{
|
{
|
||||||
#if NETCOREAPP
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
#endif
|
|
||||||
app.Properties["host.AppName"] = BuildInfo.AppName;
|
app.Properties["host.AppName"] = BuildInfo.AppName;
|
||||||
app.UsePathBase(_configFileProvider.UrlBase);
|
app.UsePathBase(_configFileProvider.UrlBase);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -11,11 +11,6 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
|
<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" />
|
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="5.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
||||||
@@ -10,16 +10,7 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
|
<PackageReference Include="NunitXml.TestLogger" Version="2.1.62" />
|
||||||
</ItemGroup>
|
<PackageReference Include="Mono.Posix.NETStandard" Version="5.20.1-servarr1" />
|
||||||
<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="coverlet.collector" Version="1.3.0" PrivateAssets="all" />
|
<PackageReference Include="coverlet.collector" Version="1.3.0" PrivateAssets="all" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,19 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="NLog" Version="4.7.2" />
|
<PackageReference Include="NLog" Version="4.7.2" />
|
||||||
<PackageReference Include="System.IO.Abstractions" Version="12.0.4" />
|
<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" />
|
<PackageReference Include="Mono.Posix.NETStandard" Version="5.20.1-servarr1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
|
|
||||||
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
|
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NzbDrone.Core\Readarr.Core.csproj" />
|
<ProjectReference Include="..\NzbDrone.Core\Readarr.Core.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -7,11 +7,7 @@ namespace NzbDrone.SignalR
|
|||||||
public object Body { get; set; }
|
public object Body { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
#if !NETCOREAPP
|
|
||||||
[Newtonsoft.Json.JsonIgnore]
|
|
||||||
#else
|
|
||||||
[System.Text.Json.Serialization.JsonIgnore]
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
#endif
|
|
||||||
public ModelAction Action { get; set; }
|
public ModelAction Action { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,9 +164,7 @@ namespace NzbDrone.Test.Common.AutoMoq
|
|||||||
RegisterPlatformLibrary(container);
|
RegisterPlatformLibrary(container);
|
||||||
AddTheAutoMockingContainerExtensionToTheContainer(container);
|
AddTheAutoMockingContainerExtensionToTheContainer(container);
|
||||||
|
|
||||||
#if NETCOREAPP
|
|
||||||
ContainerBuilderBase.RegisterSQLiteResolver();
|
ContainerBuilderBase.RegisterSQLiteResolver();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void AddTheAutoMockingContainerExtensionToTheContainer(IUnityContainer container)
|
private static void AddTheAutoMockingContainerExtensionToTheContainer(IUnityContainer container)
|
||||||
|
|||||||
@@ -57,8 +57,7 @@ namespace NzbDrone.Test.Common
|
|||||||
_startupLog = new List<string>();
|
_startupLog = new List<string>();
|
||||||
if (BuildInfo.IsDebug)
|
if (BuildInfo.IsDebug)
|
||||||
{
|
{
|
||||||
var frameworkFolder = PlatformInfo.IsNetCore ? "net5.0" : "net462";
|
Start(Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "_output", "net5.0", readarrConsoleExe));
|
||||||
Start(Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "_output", frameworkFolder, readarrConsoleExe));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="FluentAssertions" Version="5.10.3" />
|
<PackageReference Include="FluentAssertions" Version="5.10.3" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="NLog" Version="4.7.2" />
|
<PackageReference Include="NLog" Version="4.7.2" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="NLog" Version="4.7.2" />
|
<PackageReference Include="NLog" Version="4.7.2" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFrameworks>net462;net5.0-windows</TargetFrameworks>
|
<TargetFrameworks>net5.0-windows</TargetFrameworks>
|
||||||
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>
|
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<ApplicationIcon>..\NzbDrone.Host\Readarr.ico</ApplicationIcon>
|
<ApplicationIcon>..\NzbDrone.Host\Readarr.ico</ApplicationIcon>
|
||||||
@@ -14,9 +14,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\NzbDrone.Host\Readarr.Host.csproj" />
|
<ProjectReference Include="..\NzbDrone.Host\Readarr.Host.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Update="Properties\Resources.Designer.cs">
|
<Compile Update="Properties\Resources.Designer.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Readarr.Http\Readarr.Http.csproj" />
|
<ProjectReference Include="..\Readarr.Http\Readarr.Http.csproj" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="FluentValidation" Version="8.6.2" />
|
<PackageReference Include="FluentValidation" Version="8.6.2" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
|
||||||
<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0" />
|
<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0" />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFrameworks>net462;net5.0</TargetFrameworks>
|
<TargetFrameworks>net5.0</TargetFrameworks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
|
||||||
<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0" />
|
<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0" />
|
||||||
|
|||||||
@@ -21,8 +21,6 @@
|
|||||||
<Framework>%(Framework)</Framework>
|
<Framework>%(Framework)</Framework>
|
||||||
</Renamed>
|
</Renamed>
|
||||||
|
|
||||||
<Renamed Remove="$(ExcludedRuntimeFrameworkPairs)" />
|
|
||||||
|
|
||||||
<!-- Transform RuntimeIdentifierForPublish items to project items to pass to MSBuild task -->
|
<!-- Transform RuntimeIdentifierForPublish items to project items to pass to MSBuild task -->
|
||||||
<ProjectToPublish Include="@(Renamed->'$(MSBuildProjectFullPath)')">
|
<ProjectToPublish Include="@(Renamed->'$(MSBuildProjectFullPath)')">
|
||||||
<AdditionalProperties>RuntimeIdentifier=%(Renamed.Runtime);TargetFramework=%(Renamed.Framework)</AdditionalProperties>
|
<AdditionalProperties>RuntimeIdentifier=%(Renamed.Runtime);TargetFramework=%(Renamed.Framework)</AdditionalProperties>
|
||||||
|
|||||||
Reference in New Issue
Block a user