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

failed to patch the main assembly file #1

Closed
FillPavS opened this issue Feb 16, 2018 · 14 comments
Closed

failed to patch the main assembly file #1

FillPavS opened this issue Feb 16, 2018 · 14 comments

Comments

@FillPavS
Copy link


Instructions
Extract to your Subnautica folder and run AssemblyPatcher.exe

But when I run the file, I get an error :(

204

@wolrah
Copy link

wolrah commented Feb 17, 2018

I am experiencing the same thing, here is the error in English:
image

Failed to patch the main assembly file:

Could not load file or assembly 'dnlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=50e96378b6e77999' or one of its dependencies. The system cannot find the file specified.
   at AssemblyPatcher.Program.PatchMainAssembly()
   at AssemblyPatcher.Program.Main(String[] args)

I'm guessing that means dnlib wasn't correctly linked in to the exe in the release package.

@HexiDave
Copy link
Owner

My fault - I had forgotten to include two libraries into the release package. I'm still adjusting the build system for automated releases.

If you check the latest release (https://github.com/HexiDave/SubnauticaMods/releases/tag/v2.0) you should be good to go, along with a new mod!

Let me know if you still have this problem with the new release.

@wolrah
Copy link

wolrah commented Feb 17, 2018

Just tested the new release and it worked as expected. I didn't fully test all the mods but MoreQuickSlots and PullFromContainer were definitely working as expected. Looks good to me!

@HexiDave
Copy link
Owner

Great! Thanks for checking. Gonna close this. @FillPavS - if you're still having issues, let me know and I'll re-open and investigate.

@FillPavS
Copy link
Author

FillPavS commented Feb 17, 2018

@HexiDave, problem still exists. When I run the file AssemblyPatcher.exe, the following happens.
205

If I copy the files BootstrapLib.dll, dnlib.dll side by side to the file AssemblyPatcher.exe then there will be another error
206

if I copy the mods folder on the path specified in the window, I get an error too
207

sorry for my English. I hope you got what I meant ;)

@HexiDave
Copy link
Owner

HexiDave commented Feb 18, 2018 via email

@HexiDave
Copy link
Owner

Re-opening this until I hear that it's resolved for you - I want to make sure there isn't a situation I'm not seeing.

@HexiDave HexiDave reopened this Feb 18, 2018
@FillPavS
Copy link
Author

@HexiDave, at first i used the location of the files as in the archive. Maybe I need to install additional software? Visual Studio or another?

@HexiDave
Copy link
Owner

Hm, you might need the .NET 4.6.1 runtime to operate the patcher, but it should be installed by default on Win7+

You can try it here:
https://www.microsoft.com/en-us/download/details.aspx?id=49981

I'd suggest making sure that none of the files are anywhere from your earlier tests - remove from Subnautica's folder and any sub-folders:

  • AssemblyPatcher.exe
  • BootstrapLib.dll
  • dnlib.dll
  • All the mod files/folders

Then run the Steam file verification step:

  • Right-click on Subnautica in the games library and select Properties
  • Select the Local Files tab
  • Click "Verify integrity of game files"

Then give it another shot with the latest release available:
https://github.com/HexiDave/SubnauticaMods/releases/latest

@FillPavS
Copy link
Author

FillPavS commented Feb 18, 2018

@HexiDave, I did as you said, but the result is the same :(
208
209

Does the patcher have a debug or log? I think that the problem with the definition of the path

@HexiDave
Copy link
Owner

It doesn't have anything that would help here, but I'll be adding something more robust in the next few days. Sorry you're having so much trouble with it!

Someone else ran into a very similar problem and found that Windows Defender was holding some of the files hostage. I'll understand if you don't want to do this, but could you try adding a folder exclusion for Subnautica?

https://support.microsoft.com/en-us/help/4028485/windows-10-add-an-exclusion-to-windows-defender-antivirus

If you have a different anti-virus program running, it also might be holding onto the DLLs since they're modifying other binaries - which is generally regarded by most security programs as extremely sketchy.

@FillPavS
Copy link
Author

Yes, I have another antivirus program installed, and the Windows defender is turned off. I completely disabled the antivirus, but the error still exists. I'll wait until more people will use your great mods, and maybe someone else will be a similar problem. And then you can find a regularity. Thanks

Now I have a patched version of the dll first version and I'm still going to play with him. I downloaded it from the link under the video on YouTube.

@greymatter42
Copy link

Hey @FillPavS I was running into similar issues and was able to finally run the patcher after unblocking all included dlls in the managed and mods directories. Hope this helps!

Also, thanks for the work Helix!

screen shot 2018-02-19 at 6 24 02 pm

@FillPavS
Copy link
Author

@greymatter42, this helps! Thanks for the solution!!!
@HexiDave, many thanks for the mods!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants