fix: Fixes .net 6 compilation (#860)
This commit is contained in:
parent
c8043e8dd2
commit
c8a6d4c696
7 changed files with 36 additions and 17 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
<Authors>Kamron Batman</Authors>
|
<Authors>Kamron Batman</Authors>
|
||||||
<Company>ModernUO</Company>
|
<Company>ModernUO</Company>
|
||||||
<Copyright>2019-2020</Copyright>
|
<Copyright>2019-2020</Copyright>
|
||||||
<TargetFrameworks>net5.0;net6.0</TargetFrameworks>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<Platforms>x64</Platforms>
|
<Platforms>x64</Platforms>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<LangVersion>preview</LangVersion>
|
<LangVersion>preview</LangVersion>
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Serilog" Version="2.10.0" />
|
<PackageReference Include="Serilog" Version="2.10.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
|
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" />
|
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
|
||||||
<PackageReference Include="Nerdbank.GitVersioning" Condition="!Exists('packages.config')">
|
<PackageReference Include="Nerdbank.GitVersioning" Condition="!Exists('packages.config')">
|
||||||
<Version>3.4.244</Version>
|
<Version>3.4.244</Version>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,17 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>netstandard2.0</TargetFrameworks>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<LangVersion>preview</LangVersion>
|
<LangVersion>preview</LangVersion>
|
||||||
<BuildOutputTargetFolder>analyzers</BuildOutputTargetFolder>
|
<BuildOutputTargetFolder>analyzers</BuildOutputTargetFolder>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.3" PrivateAssets="all" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.11.0" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1" />
|
||||||
<PackageReference Include="Humanizer.Core" Version="2.11.10" GeneratePathProperty="true" PrivateAssets="all" />
|
<PackageReference Include="Humanizer.Core" Version="2.13.14" GeneratePathProperty="true" PrivateAssets="all" />
|
||||||
<PackageReference Include="System.Text.Json" Version="5.0.0" GeneratePathProperty="true" PrivateAssets="all" />
|
<PackageReference Include="System.Text.Json" Version="6.0.0" GeneratePathProperty="true" PrivateAssets="all" />
|
||||||
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.0" GeneratePathProperty="true" PrivateAssets="all" />
|
<PackageReference Include="System.Text.Encodings.Web" Version="6.0.0" GeneratePathProperty="true" PrivateAssets="all" />
|
||||||
|
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" GeneratePathProperty="true" PrivateAssets="all" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|
@ -22,6 +23,7 @@
|
||||||
<TargetPathWithTargetPlatformMoniker Include="$(PKGHumanizer_Core)\lib\netstandard2.0\*.dll" IncludeRuntimeDependency="false" />
|
<TargetPathWithTargetPlatformMoniker Include="$(PKGHumanizer_Core)\lib\netstandard2.0\*.dll" IncludeRuntimeDependency="false" />
|
||||||
<TargetPathWithTargetPlatformMoniker Include="$(PKGSystem_Text_Json)\lib\netstandard2.0\*.dll" IncludeRuntimeDependency="false" />
|
<TargetPathWithTargetPlatformMoniker Include="$(PKGSystem_Text_Json)\lib\netstandard2.0\*.dll" IncludeRuntimeDependency="false" />
|
||||||
<TargetPathWithTargetPlatformMoniker Include="$(PKGSystem_Text_Encodings_Web)\lib\netstandard2.0\*.dll" IncludeRuntimeDependency="false" />
|
<TargetPathWithTargetPlatformMoniker Include="$(PKGSystem_Text_Encodings_Web)\lib\netstandard2.0\*.dll" IncludeRuntimeDependency="false" />
|
||||||
|
<TargetPathWithTargetPlatformMoniker Include="$(PKGMicrosoft_Bcl_AsyncInterfaces)\lib\netstandard2.0\*.dll" IncludeRuntimeDependency="false" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
|
||||||
<OutDir>Output</OutDir>
|
<OutDir>Output</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
@ -14,7 +13,10 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Build.Locator" Version="1.4.1" />
|
<PackageReference Include="Microsoft.Build.Locator" Version="1.4.1" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.11.0" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.0.1" />
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.11.0" />
|
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.0.1" />
|
||||||
|
<PackageReference Include="System.Text.Json" Version="6.0.0" />
|
||||||
|
<PackageReference Include="System.Text.Encodings.Web" Version="6.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
<Delete Files="..\..\Distribution\zlib.dll" ContinueOnError="true" />
|
<Delete Files="..\..\Distribution\zlib.dll" ContinueOnError="true" />
|
||||||
</Target>
|
</Target>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Toolkit.HighPerformance" Version="7.1.0" />
|
<PackageReference Include="Microsoft.Toolkit.HighPerformance" Version="7.1.2" />
|
||||||
<PackageReference Include="PollGroup" Version="1.1.0" />
|
<PackageReference Include="PollGroup" Version="1.1.0" />
|
||||||
<PackageReference Include="Zlib.Bindings" Version="1.5.0" />
|
<PackageReference Include="Zlib.Bindings" Version="1.5.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -1049,6 +1049,21 @@ namespace Server
|
||||||
return min + (int)RandomSources.Source.Next((uint)(max - min + 1));
|
return min + (int)RandomSources.Source.Next((uint)(max - min + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public static long RandomMinMax(long min, long max)
|
||||||
|
{
|
||||||
|
if (min > max)
|
||||||
|
{
|
||||||
|
(min, max) = (max, min);
|
||||||
|
}
|
||||||
|
else if (min == max)
|
||||||
|
{
|
||||||
|
return min;
|
||||||
|
}
|
||||||
|
|
||||||
|
return min + RandomSources.Source.Next(max - min + 1);
|
||||||
|
}
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public static int Random(int from, int count) => RandomSources.Source.Next(from, count);
|
public static int Random(int from, int count) => RandomSources.Source.Next(from, count);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ namespace Server.Items
|
||||||
[Serializable(0, false)]
|
[Serializable(0, false)]
|
||||||
public partial class AnkhWest : Item
|
public partial class AnkhWest : Item
|
||||||
{
|
{
|
||||||
[SerializableField(0)]
|
[SerializableField(0, getter: "private", setter: "private")]
|
||||||
private InternalItem _item;
|
private InternalItem _item;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
|
|
@ -184,7 +184,7 @@ namespace Server.Items
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable(0, false)]
|
[Serializable(0, false)]
|
||||||
private class InternalItem : Item
|
private partial class InternalItem : Item
|
||||||
{
|
{
|
||||||
[SerializableField(0)]
|
[SerializableField(0)]
|
||||||
private AnkhWest _item;
|
private AnkhWest _item;
|
||||||
|
|
@ -260,7 +260,7 @@ namespace Server.Items
|
||||||
[Serializable(0, false)]
|
[Serializable(0, false)]
|
||||||
public partial class AnkhNorth : Item
|
public partial class AnkhNorth : Item
|
||||||
{
|
{
|
||||||
[SerializableField(0)]
|
[SerializableField(0, getter: "private", setter: "private")]
|
||||||
private InternalItem _item;
|
private InternalItem _item;
|
||||||
|
|
||||||
[Constructible]
|
[Constructible]
|
||||||
|
|
@ -332,7 +332,7 @@ namespace Server.Items
|
||||||
|
|
||||||
[TypeAlias("Server.Items.AnkhEast+InternalItem")]
|
[TypeAlias("Server.Items.AnkhEast+InternalItem")]
|
||||||
[Serializable(0, false)]
|
[Serializable(0, false)]
|
||||||
private class InternalItem : Item
|
private partial class InternalItem : Item
|
||||||
{
|
{
|
||||||
[SerializableField(0)]
|
[SerializableField(0)]
|
||||||
private AnkhNorth _item;
|
private AnkhNorth _item;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<PackageReference Include="MailKit" Version="2.15.0" />
|
<PackageReference Include="MailKit" Version="2.15.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.Toolkit.HighPerformance" Version="7.1.0" />
|
<PackageReference Include="Microsoft.Toolkit.HighPerformance" Version="7.1.2" />
|
||||||
<PackageReference Include="Zlib.Bindings" Version="1.5.0" />
|
<PackageReference Include="Zlib.Bindings" Version="1.5.0" />
|
||||||
<PackageReference Include="Argon2.Bindings" Version="1.9.1" />
|
<PackageReference Include="Argon2.Bindings" Version="1.9.1" />
|
||||||
<PackageReference Include="Zstd.Binaries" Version="1.0.0" />
|
<PackageReference Include="Zstd.Binaries" Version="1.0.0" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue