Skip to content

Commit 31d7b06

Browse files
SadPencilfrg2089
andcommitted
Fix MSBuild configurations for XNA dependencies and runtime identifier
Co-Authored-By: 舰队的偶像-岛风酱! <[email protected]>
1 parent 06b160b commit 31d7b06

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CommonAssemblies.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Newtonsoft.Json.Bson.dll
3434
Newtonsoft.Json.dll
3535
OpenMcdf.dll
3636
Rampastring.Tools.dll
37+
Rampastring.Tools.pdb
38+
Rampastring.Tools.xml
3739
SixLabors.ImageSharp.dll
3840
System.CodeDom.dll
3941
steam_api64.dll

CommonAssembliesNetFx.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Newtonsoft.Json.Bson.dll
3535
Newtonsoft.Json.dll
3636
OpenMcdf.dll
3737
Rampastring.Tools.dll
38+
Rampastring.Tools.pdb
39+
Rampastring.Tools.xml
3840
SixLabors.ImageSharp.dll
3941
steam_api64.dll
4042
System.Buffers.dll

DXMainClient/DXMainClient.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
<PropertyGroup>
33
<OutputType Condition="'$(Engine)' != 'UniversalGL'">WinExe</OutputType>
44
<OutputType Condition="'$(Engine)' == 'UniversalGL'">Exe</OutputType>
5-
<!-- Note: specify Prefer32Bit only for .NET 4.8 XNA build. For .NET 8 builds, there are no Prefer32Bit option. -->
6-
<!-- For .NET 8, there is a parameter "arch" but frg2089 said it is not necessary to specify this parameter since we don't use AppHost. -->
5+
<!-- Specify Prefer32Bit only for .NET 4.8 XNA build. -->
76
<Prefer32Bit Condition="'$(Engine)' == 'WindowsXNA' And '$(TargetFrameworkIdentifier)' == '.NETFramework'">true</Prefer32Bit>
87
<Prefer32Bit Condition="'$(Engine)' != 'WindowsXNA' And '$(TargetFrameworkIdentifier)' == '.NETFramework'">false</Prefer32Bit>
8+
<!-- For .NET 8 builds, there are no Prefer32Bit option but RuntimeIdentifier. -->
9+
<!-- Although it is not necessary to specify this RuntimeIdentifier parameter since we don't use AppHost, we still define it to make the `.deps.json` file correct. -->
10+
<RuntimeIdentifier Condition="'$(Engine)' == 'WindowsXNA' And '$(TargetFrameworkIdentifier)' != '.NETFramework'">win-x86</RuntimeIdentifier>
11+
<UseCurrentRuntimeIdentifier>false</UseCurrentRuntimeIdentifier>
912
<UseAppHost>false</UseAppHost>
1013
<SelfContained>false</SelfContained>
1114
<Description>CnCNet Main Client</Description>

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
<XNAUIRoot>$(MSBuildThisFileDirectory)Rampastring.XNAUI</XNAUIRoot>
9898
</PropertyGroup>
9999

100-
<ItemGroup Condition="$(DefineConstants.Contains('XNA'))">
100+
<ItemGroup Condition="('$(MSBuildProjectName)' == 'ClientGUI' Or '$(MSBuildProjectName)' == 'DXMainClient') And $(Engine.Contains(XNA))">
101101
<Reference Include="Microsoft.Xna.Framework">
102102
<HintPath>$(XNAUIRoot)\References\XNA\Microsoft.Xna.Framework.dll</HintPath>
103103
</Reference>

0 commit comments

Comments
 (0)