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

Extract all platform corlib profiles for 2021.2+ #3

Open
Albeoris opened this issue Sep 30, 2024 · 1 comment
Open

Extract all platform corlib profiles for 2021.2+ #3

Albeoris opened this issue Sep 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Albeoris
Copy link

What happened?

I encountered the fact that DLLs in a game created on Unity 2022.3.30.f1 were stripped.
Because of this, the preloader crashed with the error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: void System.Reflection.Module.GetPEKind(System.Reflection.PortableExecutableKinds&,System.Reflection.ImageFileMachine&)
  at BepInEx.Preloader.PreloaderRunner.PreloaderPreMain () [0x00000] in <47f8536982f34f539e906b1b3b7c96a0>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <3dff697d7878442fa5427675adf00b31>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0004b] in <3dff697d7878442fa5427675adf00b31>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <3dff697d7878442fa5427675adf00b31>:0 
  at Doorstop.Entrypoint.Start () [0x0008b] in <47f8536982f34f539e906b1b3b7c96a0>:0

I followed this guide and downloaded unstripped corlibs from the archive.

But the game starts crashing because of:

DllNotFoundException: System.Native assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag()
  at Interop+Sys..cctor () [0x00000] in <f06813fea36f4d329c559563c08ea387>:0 
Rethrow as TypeInitializationException: The type initializer for 'Sys' threw an exception.
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x00007] in <f06813fea36f4d329c559563c08ea387>:0 
  at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <f06813fea36f4d329c559563c08ea387>:0 
  at System.IO.File.Exists (System.String path) [0x00043] in <f06813fea36f4d329c559563c08ea387>:0 
  at System.Console..cctor () [0x00000] in <f06813fea36f4d329c559563c08ea387>:0 
Rethrow as TypeInitializationException: The type initializer for 'System.Console' threw an exception.
  at UnityEngine.UnityLogWriter.Init () [0x00001] in C:\build\output\unity\unity\Runtime\Export\Logging\UnityLogWriter.bindings.cs:25 
  at UnityEngine.ClassLibraryInitializer.Init () [0x00001] in C:\build\output\unity\unity\Runtime\Export\Scripting\ClassLibraryInitializer.cs:20 

This is because the archive contains only one version of mscorlib.dll, but now it is platform-specific.

Correct Windows-specific libraries from Unity Editor:
2022.3.30_Win.zip

Could you upload DLLs for all platforms?

Steps to reproduce

  1. On Windows, in the game try use BepInEx.
  2. Download unstripped version of DLLs and compare it with correct Windows-version.

BepInEx Distribution

Stable from GitHub

Log outputs

No response

Environment

- OS: Windows 10
- BepInEx: 5.4.23.2
- Game: Bloomtown
@Albeoris Albeoris added the bug Something isn't working label Sep 30, 2024
@js6pak js6pak transferred this issue from BepInEx/BepInEx Oct 5, 2024
@js6pak js6pak changed the title Wrong unstripped DLLs for Unity 2022.3.30 Extract all platform corlib profiles for 2021.2+ Oct 5, 2024
@js6pak
Copy link
Member

js6pak commented Oct 5, 2024

Note to myself: they are all still in the linux editor under ./Editor/Data/MonoBleedingEdge/lib/mono/unityjit-{win32,linux,macos}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants