LANCommander/LANCommander.Server/LANCommander.Server.csproj
Pat Hartl 4fc1a45f88 Add support for horizontal scaling
This commit adds support to allow the LANCommander server to scale horizontally. Multiple instances of the application can be deployed for load-balancing purposes. This will require a load balancer in front of the instances, as well as either MySQL or PostgreSQL and a Redis cache.
2026-07-22 20:19:31 -05:00

155 lines
8.4 KiB
XML

<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-LANCommander-C1F79CFA-9767-4AD7-BD5A-2549F8328A2D</UserSecretsId>
<ApplicationIcon>wwwroot\favicon.ico</ApplicationIcon>
<TypeScriptModuleKind>none</TypeScriptModuleKind>
<Version>1.1.0</Version>
<Company>LANCommander</Company>
<Product>Server</Product>
</PropertyGroup>
<PropertyGroup>
<BeautySharedRuntimeMode>False</BeautySharedRuntimeMode>
<!-- beauty into sub-directory, default is libs, quote with "" if contains space -->
<BeautyLibsDir Condition="$(BeautySharedRuntimeMode) == 'True'">../Libraries</BeautyLibsDir>
<BeautyLibsDir Condition="$(BeautySharedRuntimeMode) != 'True'">./Libraries</BeautyLibsDir>
<!-- dlls that you don't want to be moved or can not be moved -->
<!-- <BeautyExcludes>dll1.dll;lib*;...</BeautyExcludes> -->
<!-- dlls that end users never needed, so hide them -->
<!-- <BeautyHiddens>hostfxr;hostpolicy;*.deps.json;*.runtimeconfig*.json</BeautyHiddens> -->
<!-- set to True if you want to disable -->
<DisableBeauty>False</DisableBeauty>
<!-- set to False if you want to beauty on build -->
<BeautyOnPublishOnly>True</BeautyOnPublishOnly>
<!-- DO NOT TOUCH THIS OPTION -->
<BeautyNoRuntimeInfo>False</BeautyNoRuntimeInfo>
<!-- set to True if you want to allow 3rd debuggers(like dnSpy) debugs the app -->
<BeautyEnableDebugging>False</BeautyEnableDebugging>
<!-- the patch can reduce the file count -->
<!-- set to False if you want to disable -->
<!-- SCD Mode Feature Only -->
<BeautyUsePatch>True</BeautyUsePatch>
<!-- App Entry Dll = BeautyDir + BeautyAppHostDir + BeautyAppHostEntry -->
<!-- see https://github.com/nulastudio/NetBeauty2#customize-apphost for more details -->
<!-- relative path based on AppHostDir -->
<!-- .NET Core Non Single-File Only -->
<!-- <BeautyAppHostEntry>bin/MyApp.dll</BeautyAppHostEntry> -->
<!-- relative path based on BeautyDir -->
<!-- .NET Core Non Single-File Only -->
<!-- <BeautyAppHostDir>..</BeautyAppHostDir> -->
<!-- <BeautyAfterTasks></BeautyAfterTasks> -->
<!-- valid values: Error|Detail|Info -->
<BeautyLogLevel>Info</BeautyLogLevel>
<!-- set to a repo mirror if you have troble in connecting github -->
<!-- <BeautyGitCDN>https://gitee.com/liesauer/HostFXRPatcher</BeautyGitCDN> -->
<!-- <BeautyGitTree>master</BeautyGitTree> -->
</PropertyGroup>
<Target Name="CompileGlobalSass" BeforeTargets="Compile">
<Message Text="Compiling global SCSS files" Importance="high" />
<Exec Command="npm run package" />
</Target>
<ItemGroup>
<ComponentScssFiles Remove="node_modules\**" />
<TypeScriptCompile Remove="node_modules\**" />
</ItemGroup>
<ItemGroup>
<Content Remove="package.json;package-lock.json;tsconfig.json;webpack.config.js" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="LANCommander.Server.Tests" />
</ItemGroup>
<PropertyGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))">
<DefineConstants>WINDOWS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))">
<DefineConstants>LINUX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))">
<DefineConstants>MACOS</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AntDesign.Charts" />
<PackageReference Include="CaseConverter" />
<PackageReference Include="CoreRCON" />
<PackageReference Include="Hangfire.AspNetCore" />
<PackageReference Include="Hangfire.Core" />
<PackageReference Include="Hangfire.InMemory" />
<PackageReference Include="Hangfire.Redis.StackExchange" />
<PackageReference Include="StackExchange.Redis" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" />
<PackageReference Include="ZiggyCreatures.FusionCache.Serialization.SystemTextJson" />
<PackageReference Include="ZiggyCreatures.FusionCache.Backplane.StackExchangeRedis" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting.Systemd" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" />
<PackageReference Include="Microsoft.TypeScript.MSBuild">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" />
<PackageReference Include="NetEscapades.Configuration.Yaml" />
<PackageReference Include="nulastudio.NetBeauty" />
<PackageReference Include="Razor.Templating.Core" />
<PackageReference Include="RegParserDotNet" />
<PackageReference Include="Scalar.AspNetCore" />
<PackageReference Include="System.Diagnostics.PerformanceCounter" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LANCommander.SDK\LANCommander.SDK.csproj" />
<ProjectReference Include="..\LANCommander.Server.Data.MySQL\LANCommander.Server.Data.MySQL.csproj" />
<ProjectReference Include="..\LANCommander.Server.Data.PostgreSQL\LANCommander.Server.Data.PostgreSQL.csproj" />
<ProjectReference Include="..\LANCommander.Server.Data.SQLite\LANCommander.Server.Data.SQLite.csproj" />
<ProjectReference Include="..\LANCommander.Server.Data\LANCommander.Server.Data.csproj" />
<ProjectReference Include="..\LANCommander.Server.ImportExport\LANCommander.Server.ImportExport.csproj" />
<ProjectReference Include="..\LANCommander.Server.Services\LANCommander.Server.Services.csproj" />
<ProjectReference Include="..\LANCommander.Server.Settings\LANCommander.Server.Settings.csproj" />
<ProjectReference Include="..\LANCommander.ServiceDefaults\LANCommander.ServiceDefaults.csproj" />
<ProjectReference Include="..\LANCommander.Steam\LANCommander.Steam.csproj" />
<ProjectReference Include="..\LANCommander.UI\LANCommander.UI.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="favicon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<!-- Copy Templates, Modules, and Snippets directories to Data folder in published output -->
<Target Name="CopyDataDirectories" AfterTargets="Publish">
<ItemGroup>
<TemplatesFiles Include="Templates\**\*" />
<ModulesFiles Include="Modules\**\*" />
<SnippetsFiles Include="Snippets\**\*" />
</ItemGroup>
<Message Text="Copying Templates, Modules, and Snippets to Data directory" Importance="high" />
<Copy SourceFiles="@(TemplatesFiles)" DestinationFolder="$(PublishDir)Data\Templates\%(RecursiveDir)" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(ModulesFiles)" DestinationFolder="$(PublishDir)Data\Modules\%(RecursiveDir)" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(SnippetsFiles)" DestinationFolder="$(PublishDir)Data\Snippets\%(RecursiveDir)" SkipUnchangedFiles="true" />
</Target>
<ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>
</Project>