videre-project / MTGOSDK

A software development kit (SDK) for inspecting and interacting with the Magic: The Gathering Online (MTGO) client.
Apache License 2.0
3 stars 0 forks source link

Migrate C++ projects to MSVCToolchain #10

Closed Qonfused closed 2 months ago

Qonfused commented 4 months ago

Allows for building native C++ projects through the .NET Core CLI (e.g. dotnet build). This is currently unsupported without providing the MSVC compiler paths, so we instead use a .csproj file and invoke the MSVC compiler directly. This expands support for building the project through the .NET Core CLI and Visual Studio.

### Tasks
- [x] Vendor MSVCToolchain submodule
- [x] Refactor SharpNeedle projects to new project format.
- [x] Refactor RemoteNET paths to point to new project format.
- [x] Verify that clean and incremental builds are supported.
- [x] Verify that parallel builds are supported and deterministic.
Qonfused commented 4 months ago

f2f27d9976169acf7de145bc0daea1be449be57a improperly migrated the (new) SharpNeedle projects:

Run msbuild SDK.sln /t:Build /m:2 /v:m /p:Configuration=Release /p:Platform="Any CPU"

MSBuild version 17.9.5+33de0b227 for .NET Framework D:\a\MTGOSDK\MTGOSDK\SDK.sln : Solution file error MSB4051: Project {D1ACBDEC-184B-4F5B-85CD-E02B5F712121} is referencing a project with GUID {E9771628-EF64-4DD8-9906-E7B1990A0FB9}, but a project with this GUID was not found in the .SLN file.

Qonfused commented 4 months ago

Restore/resolution of MSVCToolchain's 'CompilerPaths' dependency is not handled deterministically; it can occasionally fail to resolve required assembly references before they're needed:

D:\a\MTGOSDK\MTGOSDK\tools\MSVC\MSVCCompilerPaths.targets(6,5): error : The FindMSVCCompiler task could not be imported. [D:\a\MTGOSDK\MTGOSDK\third_party\SharpNeedle\src\Bootstrapper\Bootstrapper.csproj]

Qonfused commented 4 months ago

Need to verify that the Bootstrapper and Launcher (SharpNeedle) projects still function correctly.