Jump to content

Game wont load my C# assembly, says cannot find dependency


Coffeeman

Recommended Posts

I've been trying to mod DangIt, extending the ModuleFailure PartModule. It compiles fine, but when I try to load it in KSP, I get a FileNotFoundException. I am pretty sure it means that my assembly is referencing DangIt but it cant find DangIt. How do I fix this? Is it a load priority problem? How can I delay my mod loading until after DangIt? Is that even the problem? What's the deal? AAAAAAAAAAA!

Code: http://pastebin.com/Nu9zf5Ew

DangIt source: https://github.com/Ippo343/DangIt

Error log: http://pastebin.com/WcV5QC1U

My assembly is named Abaddon.dll (I put it in the DangIt folder, but it doesn't work in it's own directory.)

I have experience with C#, but have never really understood dll and dependency jive

EDIT: Have found temporary soloution by renaming the folder to zzz_Abaddon so it loads after DangIt and CrewFiles. Does anyone have a better solution?

Edited by Coffeeman
Link to comment
Share on other sites

Hey there :)

Yes, it'a load order problem. The assembly loader goes through folders in alphabetical order: you need to change the name of your folder so that it starts with E or later (I know, it's stupid), which is the reason for 000_Toolbar

Link to comment
Share on other sites

@Ippo: Have you seen this error before?

[Log]: [DangIt]: Intake[-230994][ship: Untitled Space Craft]: ERROR: Object reference not set to an instance of an object

at ippo.ModuleEngineReliability.LambdaMultiplier () [0x00000] in <filename unknown>:0

at ippo.FailureModule.Lambda () [0x00000] in <filename unknown>:0

at ippo.FailureModule.FixedUpdate () [0x00000] in <filename unknown>:0

? It happens when I lift off, and seems to break DangIt

The weird part is the ModuleEngineReliability, because I am testing on a craft WITHOUT any LF engines. Aditionally, it only happens when I lift off

EDIT: Resolved. Was inheriting from ModuleEngineReliability, not FailureModule :confused:

Edited by Coffeeman
Link to comment
Share on other sites

Or you could use KSPAssemblyDependency if Ippo had included a KSPAssembly in his code :P

Code to be added by Ippo in his properties


[assembly: KSPAssembly("DangIt", 1, 0)]

Code to be added to dependent mod


[assembly: KSPAssemblyDependency("DangIt", 1, 0)]

Link to comment
Share on other sites

@Ippo: Have you seen this error before?

Not really, no: it's very weird, are you sure there is no engine at all? Ion engines count too.

Or you could use KSPAssemblyDependency if Ippo had included a KSPAssembly in his code :P

Will do :)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...