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

Publish SDK packages to NuGet #12

Open Qonfused opened 3 months ago

Qonfused commented 3 months ago

The current SDK is only set up for users to build against a clone of the project. This is mostly due to unresolved questions on how/whether to distribute reference assemblies generated by the MTGOSDK.Ref project, which are required runtime dependencies by the main MTGOSDK library (for reflection).

Only the MTGOSDK and MTGOSDK.Win32 libraries would need to be published to NuGet, requiring an additional pipeline for packaging the built reference assemblies.

This also requires additional infrastructure for supporting publishing and building the SDK through .NET Core.

### Tasks
- [ ] https://github.com/videre-project/MTGOSDK/pull/8
- [ ] https://github.com/videre-project/MTGOSDK/pull/9
- [ ] https://github.com/videre-project/MTGOSDK/pull/13
- [ ] https://github.com/videre-project/MTGOSDK/pull/14
- [ ] https://github.com/videre-project/MTGOSDK/issues/16
- [ ] https://github.com/videre-project/MTGOSDK/issues/15
- [ ] https://github.com/videre-project/MTGOSDK/pull/20
- [x] Create NuGet publish pipeline for MTGOSDK
- [ ] https://github.com/videre-project/MTGOSDK/issues/19
- [ ] Hook publishing to GitHub Actions CI
Qonfused commented 2 months ago

Following #16, reference assemblies are still bundled with the MTGOSDK project.

Unfortunately, there isn't a reliable way of conditionally including them based on the consuming project; specifying properties doesn't work transitively or for project references (MSBuild regression).

For now, this is exposed through a UseRef property: https://github.com/videre-project/MTGOSDK/blob/cad97367f687b60d59915e144b522c4844ba2a78/MTGOSDK/MTGOSDK.ref.props#L9-L41

Qonfused commented 2 months ago

Reference assemblies are now merged with the MTGOSDK library and are not distributed separately (resolved in 4b26663f425c426edfb4d8fc1a1bc4cc5b5b3c63). Transitive build targets are still bundled with MTGOSDK.MSBuild as an optional package.

Qonfused commented 2 months ago

Ported SharpNeedle to use MSVCToolchain in https://github.com/videre-project/MTGOSDK/commit/2a632c395781c8f0d79c49e003863113c95f73d6. Will revert if or when VS C++ project tooling is supported by the .NET (Core) CLI.

Superseded by https://github.com/videre-project/MTGOSDK/pull/21.