Retain `BizHawk.Client.` prefix in executables' assembly names

This commit is contained in:
James Groom 2024-03-30 07:07:21 +10:00 committed by GitHub
parent 6d06dcd5d2
commit 7e8623fdda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,7 @@
<Import Project="MainSlnCommon.props" /> <Import Project="MainSlnCommon.props" />
<PropertyGroup> <PropertyGroup>
<OutputPath>$(MSBuildProjectDirectory)/../../output</OutputPath> <OutputPath>$(MSBuildProjectDirectory)/../../output</OutputPath>
<AssemblyName>$(MSBuildProjectName.Substring($([MSBuild]::Add($(MSBuildProjectName.LastIndexOf('.')), 1))))</AssemblyName> <ProjectNameTail>$(MSBuildProjectName.Substring($([MSBuild]::Add($(MSBuildProjectName.LastIndexOf('.')), 1))))</ProjectNameTail>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
@ -12,11 +12,13 @@
</PropertyGroup> </PropertyGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent"> <Target Name="PostBuild" AfterTargets="PostBuildEvent">
<ItemGroup> <ItemGroup>
<ExecutableAndConfigFromExecProj Include="$(OutputPath)$(MSBuildProjectName).exe*" />
<NotExecFilesFromExecProj Include="$(OutputPath)*.deps.json" /> <NotExecFilesFromExecProj Include="$(OutputPath)*.deps.json" />
<NotExecFilesFromExecProj Include="$(OutputPath)*.dll" /> <NotExecFilesFromExecProj Include="$(OutputPath)*.dll" />
<NotExecFilesFromExecProj Include="$(OutputPath)*.pdb" Exclude="$(OutputPath)EmuHawk.pdb;$(OutputPath)DiscoHawk.pdb" /> <NotExecFilesFromExecProj Include="$(OutputPath)*.pdb" Exclude="$(OutputPath)EmuHawk.pdb;$(OutputPath)DiscoHawk.pdb" />
<NotExecFilesFromExecProj Include="$(OutputPath)*.xml" /> <NotExecFilesFromExecProj Include="$(OutputPath)*.xml" />
</ItemGroup> </ItemGroup>
<Move Condition=" $(IsTargetingNetFramework) " SourceFiles="@(NotExecFilesFromExecProj)" DestinationFolder="$(OutputPath)dll/" /> <Move Condition=" $(IsTargetingNetFramework) " SourceFiles="@(NotExecFilesFromExecProj)" DestinationFolder="$(OutputPath)dll/" />
<Move SourceFiles="@(ExecutableAndConfigFromExecProj)" DestinationFiles="@(ExecutableAndConfigFromExecProj->Replace($(MSBuildProjectName), $(ProjectNameTail)))" /> <!-- keep assembly name as e.g. `BizHawk.Client.EmuHawk`, but rename file to simply `EmuHawk.exe` as we've been doing -->
</Target> </Target>
</Project> </Project>