ASharpPen / Valheim.CustomRaids

The Unlicense
5 stars 5 forks source link

Question: Do you have instructions for building this project? #84

Open Pyetrek opened 2 years ago

Pyetrek commented 2 years ago

I am trying to compile this project so I can help contribute to it. I have visual studio code 2022, and I feel like I am pretty close to getting thing working. Right now I have errors like this when building:

Error   CS0117  'ZNet' does not contain a definition for 'Update'   Valheim.CustomRaids Valheim.CustomRaids\Valheim.CustomRaids\Valheim.CustomRaids\Core\Network\Dispatcher.cs  34  Active

According to visual studio the ZNet class is declared in the assembly_valheim.dll. I don't really understand why my version of the dll does not have this method. I copied the dll from my game directory and my game is up to date. Do you know what version of that dll you were using, or is there something else that I am missing?

Edit: I see that Update is a private method in the class, still unsure of how to proceed

ASharpPen commented 2 years ago

You are hitting one of the very common gotcha's of getting started.

Its because I am working with a "publiziced" dll, where all access modifiers have been changed to public, and the project has been set to ignore them at run-time. This is to avoid the overhead and dealing with reflection.

You can generate this yourself in multiple ways, personally I have a small script using the tool https://github.com/BepInEx/NStrip that I use for stripping and publicizing the dependencies.

Pyetrek commented 2 years ago

That makes sense, thanks @ASharpPen. I'll give this a go tomorrow.

Would you consider including that DLL as one of the artifacts on a release? Would save others from having to do it at least.

ASharpPen commented 2 years ago

Yea, I will consider adding the stripped and/or publicized libs that I am using next time I do an update.