Real quick, if I might ask, but how do you use the Managed .dlls in Visual Studio? Whenever I try and add a lot of them it says that they're invalid and essentially can't be used. Is there a trick to it? I expected it to work like other unity games but it didn't.
If it's saying they're invalid, it's probably due to the project you're importing them into not being the correct framework (I think). I mod a few different games and use .NET Framework 4.8.1 in my projects with no problem.
The main one is Assembly-CSharp.dll - depending on what you're doing, you might need to reference a couple of the Unity files as well. Also, publicize them (creates a copy of the assembly where everything is public, remove read-only etc.) and reference the stripped assembly. Not critical, but it makes your life much easier when it comes to Harmony patches.
If you publicize/strip them, you need to ensure your project is set to "AllowUnsafe=true"
2 comments
Real quick, if I might ask, but how do you use the Managed .dlls in Visual Studio? Whenever I try and add a lot of them it says that they're invalid and essentially can't be used. Is there a trick to it? I expected it to work like other unity games but it didn't.
If it's saying they're invalid, it's probably due to the project you're importing them into not being the correct framework (I think). I mod a few different games and use .NET Framework 4.8.1 in my projects with no problem.
The main one is Assembly-CSharp.dll - depending on what you're doing, you might need to reference a couple of the Unity files as well.
Also, publicize them (creates a copy of the assembly where everything is public, remove read-only etc.) and reference the stripped assembly. Not critical, but it makes your life much easier when it comes to Harmony patches.
If you publicize/strip them, you need to ensure your project is set to "AllowUnsafe=true"
bbepis/NStrip: .NET Assembly stripper, publicizer and general utility tool (github.com)