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

dll going from .Net Framework 3.5 to 4.0 after stripping #1

Closed
Raicuparta opened this issue Nov 15, 2021 · 4 comments
Closed

dll going from .Net Framework 3.5 to 4.0 after stripping #1

Raicuparta opened this issue Nov 15, 2021 · 4 comments

Comments

@Raicuparta
Copy link

Using the files Assembly-CSharp.dll and Assembly-CSharp-firstpass.dll from Firewatch 1.0.9 (GOG version).

Assembly-CSharp.dll works fine, it stays in 3.5. But Assembly-CSharp-firstpass.dll for some reason gets bumped to Framework 4.0 (with or without publicizing), and this seems to make it break on building a project that uses that dll as a dependency. Don't think I can update the project to 4.0 because that breaks other stuff.

@PhantomGamers
Copy link

Do you see the same behavior if you use the --keep-resources argument?

@Raicuparta
Copy link
Author

Tried --keep-resources just now, doesn't seem to make a difference. Also tried all the different stripping methods.

@bbepis
Copy link
Owner

bbepis commented Nov 15, 2021

Would you be able to send me the original DLL files?

If you don't want to upload it to github, you can DM me through https://discord.gg/RFKW4ZBW

@bbepis
Copy link
Owner

bbepis commented Nov 16, 2021

This should be fixed in v1.3

Thanks to @Raicuparta helping me debug this, the issue was that NStrip was adding a reference to mscorlib 4.0 due to using Cecil's runtime type resolution (NStrip is a .NET 4.5.2 project, so Cecil was assuming that we wanted mscorlib 4.0)

Creating type references in respect to the mscorlib used by the target assembly fixes this.
See these two links:
https://stackoverflow.com/questions/15603220/mono-cecil-write-library-target-framework-3-5-it-writes-reference-to-mscorlib
https://stackoverflow.com/questions/33532502/mono-cecil-wrong-mscorlib-version

Please reopen this issue if you're experiencing this issue again

@bbepis bbepis closed this as completed Nov 16, 2021
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

3 participants