Build Sonarr on Net6

Co-Authored-By: ta264 <ta264@users.noreply.github.com>
This commit is contained in:
Qstick 2021-07-30 00:47:53 -04:00 committed by Mark McDowall
parent f79ae77a3a
commit 878d1561aa
222 changed files with 3643 additions and 5311 deletions

View file

@ -1,4 +1,4 @@
using System.IO;
using System.IO;
using System.Security.AccessControl;
using System.Security.Principal;
using NUnit.Framework;
@ -25,15 +25,17 @@ namespace NzbDrone.Windows.Test.DiskProviderTests
if (Directory.Exists(path))
{
var ds = Directory.GetAccessControl(path);
var directory = new DirectoryInfo(path);
var ds = directory.GetAccessControl();
ds.SetAccessRule(new FileSystemAccessRule(owner, FileSystemRights.Write, accessControlType));
Directory.SetAccessControl(path, ds);
directory.SetAccessControl(ds);
}
else
{
var fs = File.GetAccessControl(path);
var file = new FileInfo(path);
var fs = file.GetAccessControl();
fs.SetAccessRule(new FileSystemAccessRule(owner, FileSystemRights.Write, accessControlType));
File.SetAccessControl(path, fs);
file.SetAccessControl(fs);
}
}
}

View file

@ -22,7 +22,9 @@ namespace NzbDrone.Windows.Test.DiskProviderTests
for (char driveletter = 'Z'; driveletter > 'D'; driveletter--)
{
if (new DriveInfo(driveletter.ToString()).IsReady)
{
continue;
}
Assert.Throws<DirectoryNotFoundException>(() => Subject.GetAvailableSpace(driveletter + @":\NOT_A_REAL_PATH\DOES_NOT_EXIST"));
return;

View file

@ -6,7 +6,7 @@ using NzbDrone.Test.Common;
namespace NzbDrone.Windows.Test.EnvironmentInfo
{
[TestFixture]
[Platform("Win")]
[Platform("Net")]
public class DotNetPlatformInfoFixture : TestBase<PlatformInfo>
{
[Test]

View file

@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<Platforms>x86</Platforms>
<TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Common.Test\Sonarr.Common.Test.csproj" />

View file

@ -5,4 +5,4 @@
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
</configuration>
</configuration>