Closed Qonfused closed 3 months ago
Should look into packaging properties/targets under a buildTransitive
folder in the NuGet package (reference).
Bootstrapping MTGO reference assembly generation at project reference and including the directory paths dynamically would avoid needing to publish the reference assemblies in the package. Instead, they can be generated at restore/build-time.
Below is an example of how this can be used in the MTGOSDK library (as well as in consumer applications):
<ItemGroup>
<!--
Import the MTGOSDK.Ref project to generate reference assemblies for the
current MTGO version. Consumers of MTGOSDK should not need to reference
this project directly as it is imported transitively.
-->
<ProjectReference Include="..\MTGOSDK.Ref\MTGOSDK.Ref.csproj"
ReferenceOutputAssembly="false" />
<!--
Include reference assemblies to compile against the current MTGO version.
-->
<Reference Include="Core" />
<Reference Include="FlsClient" />
<Reference Include="MTGOEnumStruct" />
<Reference Include="WotC.MtGO.Client.Common" />
<Reference Include="WotC.MtGO.Client.Model.Chat" />
<Reference Include="WotC.MtGO.Client.Model.Core" />
<Reference Include="WotC.MtGO.Client.Model.Reference" />
</ItemGroup>
Within the MTGOSDK.Ref project, a new target should include the built reference assemblies for consumption through the library (without needing explicit references for each DLL):
Versus the current setup, which requires bootstrapping the MTGOSDK.Ref project with MTGOSDK.MSBuild (internal project):