Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a way to compile assemblies without dependencies on Unity or KSP #44

Closed
JonnyOThan opened this issue Feb 19, 2025 · 0 comments
Closed
Labels
enhancement New feature or request msbuild Related to props, targets, build system

Comments

@JonnyOThan
Copy link
Contributor

SCANsat has an assembly that needs to be included in its unity project, which means that it cannot depend on KSP's Assembly-CSharp. There may be a workaround here by providing a stub dll with the things that it would need (mostly KSPAssembly and KSPAssemblyDependency attributes).

KOS has an assembly that should not depend on Unity nor KSP - the core of the mod is actually a totally pure C# assembly so that it can be unit-tested outside of the game.

In both cases, the assemblies should be compiled by KSPBuildTools just like actual mod assemblies and copied to the binary output directory, etc.

To support these use cases, we should add a mechanism to disable the auto-referencing of the unity and KSP assemblies. Something like:

<PropertyGroup>
  <ReferenceUnityAssemblies>false</ReferenceUnityAssemblies>
  <ReferenceKSPAssemblies>false</ReferenceKSPAssemblies>
</PropertyGroup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request msbuild Related to props, targets, build system
Development

No branches or pull requests

1 participant