BUTR/Bannerlord.BLSE

View on GitHub
src/Bannerlord.BLSE.Loaders.Standalone/Bannerlord.BLSE.Loaders.Standalone.csproj

Summary

Maintainability
Test Coverage
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>winexe</OutputType>
    <PlatformTarget>x64</PlatformTarget>
    <TargetFramework>net472</TargetFramework>
    <LangVersion>12.0</LangVersion>
    <Nullable>enable</Nullable>
    <ApplicationIcon>../../resources/BLSE_SMALL.ico</ApplicationIcon>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <DefineConstants>$(DefineConstants);STANDALONE;NETCOREHOSTING;_NETFRAMEWORKHOSTING</DefineConstants>
    <AssemblyName>Bannerlord.BLSE.Standalone</AssemblyName>

    <BuildShared>true</BuildShared>
    <GameConfiguration Condition="$(GameConfiguration) == '' AND Exists('$(GameFolder)\bin\Win64_Shipping_Client')">Win64_Shipping_Client</GameConfiguration>
    <GameConfiguration Condition="$(GameConfiguration) == '' AND Exists('$(GameFolder)\bin\Gaming.Desktop.x64_Shipping_Client')">Gaming.Desktop.x64_Shipping_Client</GameConfiguration>
  </PropertyGroup>

  <!--
  <PropertyGroup>
    <PublishAot>true</PublishAot>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <SelfContained>true</SelfContained>
    <TrimMode>full</TrimMode>
    <DebugType>none</DebugType>
    <GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
  </PropertyGroup>
  
  <PropertyGroup>
    <DebuggerSupport>false</DebuggerSupport>
    <AutoreleasePoolSupport>false</AutoreleasePoolSupport>
    <EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
    <EventSourceSupport>false</EventSourceSupport>
    <HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
    <InvariantGlobalization>true</InvariantGlobalization>
    <UseNativeHttpHandler>true</UseNativeHttpHandler>
    <UseSystemResourceKeys>true</UseSystemResourceKeys>

    <StripSymbols>true</StripSymbols>
    <RootAllApplicationAssemblies>false</RootAllApplicationAssemblies>
    <IlcOptimizationPreference>Size</IlcOptimizationPreference>
    <IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
    <IlcFoldIdenticalMethodBodies>true</IlcFoldIdenticalMethodBodies>
    <IlcDisableReflection>true</IlcDisableReflection>
    <IlcDisableUnhandledExceptionExperience>true</IlcDisableUnhandledExceptionExperience>
    <IlcGenerateCompleteTypeMetadata>false</IlcGenerateCompleteTypeMetadata>
    <IlcInvariantGlobalization>true</IlcInvariantGlobalization>
    <IlcTrimMetadata>true</IlcTrimMetadata>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.DotNet.ILCompiler; runtime.win-x64.Microsoft.DotNet.ILCompiler" Version="8.0.0-preview.2.23128.3" />
  </ItemGroup>
  -->

  <ItemGroup>
    <PackageReference Include="Microsoft.Windows.CsWin32" Version="0.2.229-beta" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
  </ItemGroup>

  <ItemGroup>
    <Reference Include="System.Windows.Forms" />
  </ItemGroup>

  <Target Name="PublishRoslynExecutableProjects" AfterTargets="Build">
    <CallTarget Targets="Publish" />
  </Target>
  <Target Name="PostBuild" AfterTargets="Publish" Condition="Exists($(GameFolder))">
    <ItemGroup>
      <Files Include="$(MSBuildProjectDirectory)\$(OutputPath)\publish\$(AssemblyName).exe" />
      <FilesWin64 Include="$(MSBuildProjectDirectory)\_Root\bin\Win64_Shipping_Client\**\*" />
    </ItemGroup>
    <Copy Condition="$(GameConfiguration) == 'Win64_Shipping_Client'" SourceFiles="@(FilesWin64)" DestinationFolder="$(GameFolder)\bin\$(GameConfiguration)" />
    <Copy SourceFiles="@(Files)" DestinationFolder="$(GameFolder)\bin\$(GameConfiguration)" />
  </Target>

  <ItemGroup>
    <Compile Include="..\Bannerlord.BLSE.Shared\Utils\HarmonyFinder.cs" />
  </ItemGroup>

  <ItemGroup Condition="$(BuildShared) == 'true'">
    <ProjectReference Include="..\Bannerlord.BLSE.Shared\Bannerlord.BLSE.Shared.csproj" ReferenceOutputAssembly="false" />
  </ItemGroup>

</Project>