fix: Updates dependencies, cleans up csproj, and updates README (#784)

This commit is contained in:
Kamron Batman 2021-09-15 09:54:15 -07:00 committed by GitHub
parent 3ade2d5e73
commit ec785e6f07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 67 additions and 91 deletions

View file

@ -26,7 +26,7 @@ jobs:
- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.302
dotnet-version: 5.0.401
- name: Build
run: ./publish.cmd
- name: Test

View file

@ -57,9 +57,9 @@
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.4.220">
<PackageReference Include="Nerdbank.GitVersioning" Condition="!Exists('packages.config')">
<Version>3.4.231</Version>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<AdditionalFiles Include=".\Rules.ruleset" />
</ItemGroup>

12
FAQ.md
View file

@ -1,15 +1,21 @@
# Frequently Asked Questions
- [Why do I have thousands of compile errors](#why-do-i-have-thousands-of-compile-errors)
- [Where do I go to run ModernUO?](#where-do-i-go-to-run-modernuo)
- [I don't see my scripts compiling, what happened?](#i-dont-see-my-scripts-compiling-what-happened)
- [Why can't I run ModernUO on a 32-bit operating system?](#why-cant-i-run-modernuo-on-a-32-bit-operating-system)
## Why do I have thousands of compile errors?
ModernUO uses a new technique called source generation. Most likely the compile errors are related to that.
To resolve the compile errors make sure you are using Visual Studio 2019 v16.10+, or Rider 2021.2+ for development and the newest .NET available.
Specifically for Visual Studio, you must build the entire solution once, restart Visual Studio entirely, and then build again.
This is required every time code changes in the `SerializationGenerator` or `SerializationSchemaGenerator` projects.
## Where do I go to run ModernUO?
Everything is run from the `Distribution` directory.
This folder is portable, so it can be moved to the production server for deployments.
## I don't see my scripts compiling, what happened?
NET Core does not support dynamic compiling. Scripts are now compiled separately and moved to the `Distribution/Assemblies` directory.
This also allows content to be divided into `modules` that can be included by dropping in the DLL.
.NET 5 does not support dynamic compiling newer versions of C#. Scripts are now compiled separately and moved to the `Distribution/Assemblies` directory.
## Why can't I run ModernUO on a 32-bit operating system?
ModernUO is optimized for performance and modern hardware.
ModernUO is optimized for performance and modern hardware. For this reason we no longer support 32-bit operating systems

View file

@ -9,7 +9,7 @@
<SkipLocalsInitiAttribute>true</SkipLocalsInitiAttribute>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.0" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
<ProjectReference Include="..\Server\Server.csproj" />
<ProjectReference Include="..\UOContent\UOContent.csproj" />
</ItemGroup>

View file

@ -7,7 +7,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.9.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.11.0" />
<PackageReference Include="Humanizer.Core" Version="2.11.10" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.Text.Json" Version="5.0.0" GeneratePathProperty="true" PrivateAssets="all" />
<PackageReference Include="System.Text.Encodings.Web" Version="5.0.0" GeneratePathProperty="true" PrivateAssets="all" />

View file

@ -14,8 +14,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Build.Locator" Version="1.4.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.10.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.10.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.11.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.11.0" />
</ItemGroup>
</Project>

View file

@ -3,7 +3,7 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />

View file

@ -12,8 +12,6 @@
<Version>0.0.0</Version>
</PropertyGroup>
<Target Name="CleanPub" AfterTargets="Clean">
<Message Text="Deleting source generated files..." />
<Delete Files="Generated\**" ContinueOnError="true" />
<Message Text="Removing distribution files..." />
<Delete Files="..\..\Distribution\zlib.dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\libz.dylib" ContinueOnError="true" />
@ -32,8 +30,6 @@
<Delete Files="..\..\Distribution\$(AssemblyName).pdb" ContinueOnError="true" />
<Delete Files="..\..\Distribution\$(AssemblyName).runtimeconfig.dev.json" ContinueOnError="true" />
<Delete Files="..\..\Distribution\$(AssemblyName).runtimeconfig.json" ContinueOnError="true" />
<Delete Files="Generated\**\*" ContinueOnError="true" />
<RemoveDir Directories="Generated" ContinueOnError="true" />
</Target>
<ItemGroup>
<PackageReference Include="Microsoft.Toolkit.HighPerformance" Version="7.0.2" />
@ -47,32 +43,10 @@
<PrivateAssets>all</PrivateAssets>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SerializationGenerator\SerializationGenerator.csproj">
<SetTargetFramework>TargetFramework=netstandard2.0</SetTargetFramework>
<OutputItemType>Analyzer</OutputItemType>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<PrivateAssets>all</PrivateAssets>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="Migrations/*.v*.json" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Serialization\Attributes\SerializableFieldSaveValueDefaultAttribute.cs" />
</ItemGroup>
<PropertyGroup Condition="'$(RiderVersion)' != '' AND $([MSBuild]::VersionLessThan($(RiderVersion), '2021.2.0'))">
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
<Target Name="RemoveSourceGeneratedFiles" BeforeTargets="CoreCompile" Condition="'$(RiderVersion)' != '' AND $([MSBuild]::VersionLessThan($(RiderVersion), '2021.2.0'))">
<ItemGroup>
<Compile Remove="Generated\**" />
</ItemGroup>
</Target>
<Target Name="AddSourceGeneratedFiles" AfterTargets="CoreCompile" Condition="'$(RiderVersion)' != '' AND $([MSBuild]::VersionLessThan($(RiderVersion), '2021.2.0'))">
<ItemGroup>
<Compile Include="Generated\**" />
</ItemGroup>
</Target>
</Project>

View file

@ -3,7 +3,7 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />

View file

@ -8,14 +8,16 @@
<OutDir>..\..\Distribution\Assemblies</OutDir>
</PropertyGroup>
<Target Name="CleanPub" AfterTargets="Clean">
<Message Text="Deleting source generated files..." />
<Delete Files="Generated\**" ContinueOnError="true" />
<Message Text="Removing distribution assemblies..." />
<Delete Files="..\..\Distribution\Assemblies\Argon2.Bindings.dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\BouncyCastle.Crypto.dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\MailKit.dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\MimeKit.dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\Microsoft.Toolkit.HighPerformance.dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\Microsoft.Extensions.FileSystemGlobbing.dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\Serilog.dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\Serilog.Sinks.Async.dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\Serilog.Sinks.Console.dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\System.Security.Cryptography.Pkcs.dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\$(AssemblyName).dll" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\ref\$(AssemblyName).dll" ContinueOnError="true" />
@ -28,14 +30,12 @@
<Delete Files="..\..\Distribution\Assemblies\libz.dylib" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\libz.so" ContinueOnError="true" />
<Delete Files="..\..\Distribution\Assemblies\ZLib.Bindings.dll" ContinueOnError="true" />
<Delete Files="Generated\**\*" ContinueOnError="true" />
<RemoveDir Directories="Generated" ContinueOnError="true" />
</Target>
<ItemGroup>
<ProjectReference Include="..\Server\Server.csproj" Private="false" PrivateAssets="All" IncludeAssets="None">
<IncludeInPackage>false</IncludeInPackage>
</ProjectReference>
<PackageReference Include="MailKit" Version="2.14.0" />
<PackageReference Include="MailKit" Version="2.15.0" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" Version="5.0.0" />
<PackageReference Include="Microsoft.Toolkit.HighPerformance" Version="7.0.2" />
<PackageReference Include="Zlib.Bindings" Version="1.5.0" />
@ -52,18 +52,4 @@
<ItemGroup>
<AdditionalFiles Include="Migrations/*.v*.json" />
</ItemGroup>
<PropertyGroup Condition="'$(RiderVersion)' != '' AND $([MSBuild]::VersionLessThan($(RiderVersion), '2021.2.0'))">
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
<Target Name="RemoveSourceGeneratedFiles" BeforeTargets="CoreCompile" Condition="'$(RiderVersion)' != '' AND $([MSBuild]::VersionLessThan($(RiderVersion), '2021.2.0'))">
<ItemGroup>
<Compile Remove="Generated\**" />
</ItemGroup>
</Target>
<Target Name="AddSourceGeneratedFiles" AfterTargets="CoreCompile" Condition="'$(RiderVersion)' != '' AND $([MSBuild]::VersionLessThan($(RiderVersion), '2021.2.0'))">
<ItemGroup>
<Compile Include="Generated\**" />
</ItemGroup>
</Target>
</Project>

View file

@ -6,16 +6,6 @@ ModernUO [![Discord](https://img.shields.io/discord/751317910504603701?logo=disc
=====
##### Ultima Online Server Emulator for the modern era!
[![.NET](https://img.shields.io/badge/.NET-%205.0-5C2D91)](https://dotnet.microsoft.com/download/dotnet/5.0)
<br />
![Windows](https://img.shields.io/badge/-server%202019-0078D6?logo=windows)
![OSX](https://img.shields.io/badge/-big%20sur-222222?logo=apple&logoColor=white)
![Debian](https://img.shields.io/badge/-buster-A81D33?logo=debian)
![Ubuntu](https://img.shields.io/badge/-20LTS-E95420?logo=ubuntu&logoColor=white)
![CentOS](https://img.shields.io/badge/-8.3-262577?logo=centos&logoColor=white)
![Fedora](https://img.shields.io/badge/-33-0B57A4?logo=fedora&logoColor=white)
![RedHat](https://img.shields.io/badge/-8-BE0000?logo=red%20hat&logoColor=white)
<br/>
[![GitHub license](https://img.shields.io/github/license/modernuo/ModernUO?color=blue)](https://github.com/modernuo/ModernUO/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/modernuo/ModernUO?logo=github)](https://github.com/modernuo/ModernUO/stargazers)
[![GitHub issues](https://img.shields.io/github/issues/modernuo/ModernUO?logo=github)](https://github.com/modernuo/ModernUO/issues)
@ -23,38 +13,53 @@ ModernUO [![Discord](https://img.shields.io/discord/751317910504603701?logo=disc
[![GitHub build](https://img.shields.io/github/workflow/status/modernuo/ModernUO/Build?logo=github)](https://github.com/modernuo/ModernUO/actions)
[![AzurePipelines build](https://dev.azure.com/modernuo/modernuo/_apis/build/status/Build?branchName=main)](https://dev.azure.com/modernuo/modernuo/_build/latest?definitionId=1&branchName=main)
## Building the server
#### Requirements
- [.NET 5 SDK](https://dotnet.microsoft.com/download/dotnet/5.0)
- [Visual Studio 2019/2022 (v16.10 or higher)](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community) or [Rider 2021.2 or higher](https://www.jetbrains.com/rider/download)
- Older versions will show code errors.
- Build the solution in the IDE to make errors go away.
- Visual Studio must be restarted once after the first build as well.
## Requirements
#### Supported Operating Systems
[![Windows 8.1/10/2016/2019](https://img.shields.io/badge/-server%202019-0078D6?logo=windows)](https://www.microsoft.com/en-US/evalcenter/evaluate-windows-server-2019)
![MacOS 10/11](https://img.shields.io/badge/-big%20sur-222222?logo=apple&logoColor=white)
[![Debian 9/10](https://img.shields.io/badge/-buster-A81D33?logo=debian)](https://www.debian.org/distrib/)
[![Ubuntu 16/18/20 LTS](https://img.shields.io/badge/-20LTS-E95420?logo=ubuntu&logoColor=white)](https://ubuntu.com/download/server)
[![CentOS 7/8](https://img.shields.io/badge/-8.3-262577?logo=centos&logoColor=white)](https://www.centos.org/download/)
[![Fedora 32/33/34](https://img.shields.io/badge/-33-0B57A4?logo=fedora&logoColor=white)](https://getfedora.org/en/server/download/)
[![RedHat 7/8](https://img.shields.io/badge/-8-BE0000?logo=red%20hat&logoColor=white)](https://access.redhat.com/downloads)
#### Publishing Builds
- Using terminal or powershell: `./publish.cmd [release|debug (default: release)] [os]`
#### Running the server
[![.NET](https://img.shields.io/badge/.NET-%205.0-5C2D91)](https://dotnet.microsoft.com/download/dotnet/5.0)
#### Development
[![git](https://img.shields.io/badge/-git-F05032?logo=git&logoColor=white)](https://git-scm.com/downloads)
[![.NET](https://img.shields.io/badge/.NET-%205.0.10%20SDK-5C2D91)](https://dotnet.microsoft.com/download/dotnet/5.0)
#### Supported IDEs
[<img width="64" alt="Jetbrains Rider 2021.2" src="https://user-images.githubusercontent.com/3953314/133473479-734e425c-fbb6-433a-af2d-2cc8444398e8.png">](https://www.jetbrains.com/rider/download)
[<img width="64" alt="Visual Studio 2019" src="https://user-images.githubusercontent.com/3953314/133473556-35fd48b4-6460-49b1-b7c5-b4a8c529cc04.png">](https://visualstudio.microsoft.com/downloads)
<br />
###### Note: VS Code is not currently supported.
## Getting Started
- Install prerequisite [requirements](https://github.com/modernuo/ModernUO#requirements)
- Clone this repository (or download the [latest](https://github.com/modernuo/ModernUO/archive/refs/heads/main.zip)):
- `git clone https://github.com/modernuo/ModernUO.git`
- Open `ModernUO.sln` to start developing
## Building/Publishing
- Run `./publish.cmd [release|debug (default: release)] [os]`
- `os` - [Supported operating systems](https://github.com/dotnet/core/blob/master/release-notes/5.0/5.0-supported-os.md)
- `win` - Windows 8.1/10/2016/2019
- `osx` - MacOS 10.13+/11.0 (High Sierra, Mojave, Catalina, & Big Sur)
- `ubuntu.16.04`, `ubuntu.18.04` `ubuntu.20.04` - Ubuntu LTS
- `debian.9`, `debian.10` - Debian
- `centos.7`, `centos.8` - CentOS
- `fedora.32`, `fedora.33` - Fedora
- `fedora.32`, `fedora.33`, `fedora.34` - Fedora
- `rhel.7`, `rhel.8` - Redhat
- If blank, the operating system running the build is used
## Deploying / Running Server
**Note:** Building in Visual Studio (or Rider) will not run the schema migration. The schema migration ensures future changes
to the code will be backward compatible.
## Running the Server
- Follow the [publish](https://github.com/modernuo/ModernUO#publishing-builds) instructions
- Copy `Distribution` directory to the production server
#### Requirements
- [.NET 5 Runtime](https://dotnet.microsoft.com/download/dotnet/5.0)
#### Running
- `dotnet ModernUO.dll`
#### Cleaning
- `dotnet clean`
- Run `ModernUO.exe` or `dotnet ModernUO.dll` from the `Distribution` directory on the server
## Thanks
- RunUO Team & Community

View file

@ -21,3 +21,9 @@ We greatly appreciate the support! Use one of the following platforms below:
#### Venmo
[<img alt="Venmo | Sabresite" data-canonical-src="https://user-images.githubusercontent.com/3953314/104967817-2759d880-5999-11eb-92ec-c4193da79570.png" src="https://user-images.githubusercontent.com/3953314/104967817-2759d880-5999-11eb-92ec-c4193da79570.png" width=100 />](https://venmo.com/code?user_id=1834446441414656966)
#### Bitcoin
37QmRWTCjVoNWycMpo1t5JnYVDmJTGSJ9W
#### Ethereum
0x7A9D76F497d4Ee150Ada0ea0455fF3f6e8F3b6b8

View file

@ -18,7 +18,7 @@ jobs:
displayName: 'Install .NET 5'
inputs:
packageType: sdk
version: 5.0.302
version: 5.0.401
- task: NuGetAuthenticate@0
- script: ./publish.cmd Release win
displayName: 'Build'
@ -62,7 +62,7 @@ jobs:
displayName: 'Install .NET 5'
inputs:
packageType: sdk
version: 5.0.302
version: 5.0.401
- task: NuGetAuthenticate@0
- script: ./publish.cmd Release $(os)
displayName: 'Build'