feat: net10.0 Linux Console mode — zero Mono, 0 compile errors

Migrated from net48 (.NET Framework) to net10.0 (cross-platform):
- All 14 csproj: net48 → net10.0, WindowsDesktop SDK → Microsoft.NET.Sdk
- Excluded WinForms files (Form/**, DebugControl, GameControl, etc.)
- Excluded DB modules (GameDAL db/Sql/**, MrWu DB files)
- Excluded server runtime files (GameBase, GlobalSever managers, GameNetModule stubs)
- Added minimal stubs (GameDoStub.cs, NamespaceStubs.cs, ServerCoreStubs.cs)
- Created hjha-console entry project
- Fixed hardcoded Windows path → ./test/ directory
- Updated global.json to SDK 10.0.109

Console test mode: PdkGameMain(null).Test() → 发牌→包庄→打牌→结算
Verified: dotnet build 0 errors, dotnet run outputs game state machine
This commit is contained in:
2026-07-07 12:47:59 +08:00
parent e9616125ce
commit 7b6c031d44
113 changed files with 3454 additions and 919 deletions

View File

@ -730,7 +730,14 @@ namespace PdkFriendServer.Logic
{
File.Delete("output.txt");
}
foreach (string file in Directory.GetFiles(@"C:\Users\Administrator\Desktop\temp\test"))
string testDir = !string.IsNullOrWhiteSpace(path)
? path
: "./test";
if (!Directory.Exists(testDir))
{
Directory.CreateDirectory(testDir);
}
foreach (string file in Directory.GetFiles(testDir))
{
File.Delete(file);
}

View File

@ -1,9 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net48</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<OutputType>Library</OutputType>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>PdkFriendServer</RootNamespace>
<AssemblyName>PdkFriendServer</AssemblyName>
@ -42,8 +41,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Costura.Fody" PrivateAssets="all" />
<PackageReference Include="Fody" PrivateAssets="all" />
<PackageReference Include="MessagePack.Annotations" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
<PackageReference Include="Microsoft.NET.StringTools" />
@ -72,37 +69,18 @@
<!-- </ItemGroup>-->
<ItemGroup>
<Compile Update="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Update="Properties\Resources.Designer.cs">
<AutoGen>true</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>true</DesignTime>
</Compile>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Update="Properties\Settings.Designer.cs">
<AutoGen>true</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>true</DesignTimeSharedInput>
</Compile>
<None Update="App.config">
<SubType>Designer</SubType>
</None>
<Compile Remove="Program.cs" />
<Compile Remove="Form1.cs" />
<Compile Remove="Form1.Designer.cs" />
<Compile Remove="Properties/Resources.Designer.cs" />
<Compile Remove="Properties/Settings.Designer.cs" />
<Compile Remove="GlobalManager/GameServerProxy.cs" />
<Compile Remove="GlobalManager/GameSeverManager.cs" />
<Compile Remove="GlobalManager/MyFactory.cs" />
<Compile Remove="GlobalManager/PdkFactory.cs" />
<EmbeddedResource Remove="Properties/Resources.resx" />
<None Remove="Properties/Settings.settings" />
<None Remove="App.config" />
</ItemGroup>
</Project>