Files
AdamuSw/src/Web/AdminPanel/MUnique.OpenMU.Web.AdminPanel.csproj
2026-07-14 19:00:35 +03:00

80 lines
3.8 KiB
XML

<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable;CS4014;VSTHRD110;VSTHRD100</WarningsAsErrors>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<!-- Set base path for static web assets to avoid conflicts when referenced by other web apps.
Required for .NET 10+ where WebApp-to-WebApp references are unsupported.
Also resolves asset path conflicts in .NET 9 when AdminPanel and Map both have wwwroot/css/site.css.
Note: Standalone Program.cs in this project won't serve assets correctly.
Use Startup or AdminPanel.Host projects to run the admin panel. -->
<StaticWebAssetBasePath>_content/$(MSBuildProjectName)</StaticWebAssetBasePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>..\..\..\bin\Debug\</OutputPath>
<DocumentationFile>..\..\..\bin\Debug\MUnique.OpenMU.Web.AdminPanel.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<OutputPath>..\..\..\bin\Release\</OutputPath>
<DocumentationFile>..\..\..\bin\Release\MUnique.OpenMU.Web.AdminPanel.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BCrypt.Net-Next" />
<PackageReference Include="Blazored.Toast" />
<PackageReference Include="BlazorInputFile" />
<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid" />
<PackageReference Include="Nito.AsyncEx" />
<PackageReference Include="SixLabors.ImageSharp" />
<PackageReference Include="SixLabors.ImageSharp.Drawing" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\DataModel\MUnique.OpenMU.DataModel.csproj" />
<ProjectReference Include="..\..\GameLogic\MUnique.OpenMU.GameLogic.csproj" />
<ProjectReference Include="..\..\Persistence\Initialization\MUnique.OpenMU.Persistence.Initialization.csproj" />
<ProjectReference Include="..\..\Persistence\MUnique.OpenMU.Persistence.csproj" />
<ProjectReference Include="..\Map\MUnique.OpenMU.Web.Map.csproj" />
<ProjectReference Include="..\Shared\MUnique.OpenMU.Web.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Folder Include="Components\ItemEdit\" />
</ItemGroup>
<Target Name="FixNetSdkDiscoverAssetsBug" BeforeTargets="ResolveBuildCompressedStaticWebAssetsConfiguration">
<!-- Workaround for:
The "DiscoverPrecompressedAssets" task failed unexpectedly.
System.ArgumentException: An item with the same key has already been added. Key: C:\Users\[user]\.nuget\packages\microsoft.aspnetcore.app.internal.assets\10.0.0\_framework\blazor.web.js
https://github.com/dotnet/sdk/issues/52089
This is caused by a Microsoft.NET.Sdk.Web project (like this) referencing another project that also uses Microsoft.NET.Sdk.Web.
It appears to be a .NET SDK bug, and we're not the only one hitting it.
-->
<ItemGroup>
<!-- Remove any duplicate StaticWebAsset and StaticWebAssetEndpoint items -->
<_StaticWebAsset Include="@(StaticWebAsset)" />
<StaticWebAsset Remove="@(StaticWebAsset)" />
<StaticWebAsset Include="@(_StaticWebAsset-&gt;Distinct())" />
</ItemGroup>
</Target>
</Project>