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

Harmony not running methods with .NET Standard 2.0 #28

Closed
zareedo opened this issue Jul 27, 2021 · 2 comments
Closed

Harmony not running methods with .NET Standard 2.0 #28

zareedo opened this issue Jul 27, 2021 · 2 comments

Comments

@zareedo
Copy link

zareedo commented Jul 27, 2021

This is one of the methods that doesn't run, in a separate Patch class. I'm not sure if this is because I am using .NET Standard in Visual Studio or some other issue.
[HarmonyPatch(typeof(ItemManager), "InitAllItems")] [HarmonyPostfix] private static void Init() { Debug.Log("running!"); }

@ghorsington
Copy link
Contributor

Greetings!

This looks like it should run fine. Would you mind posting a patching log? One way to enable patch logging is to use

HarmonyLib.Tools.Logger.ChannelFilter = HarmonyLib.Tools.Logger.LogChannel.All;
HarmonyLib.Tools.HarmonyFileLog.Enabled = true;

right before you apply the patch. This should generate a file named HarmonyLog.txt in the game folder.

@ghorsington
Copy link
Contributor

Closing as stale. If you have any further issues, feel free to create a new issue with relevant patch logs included.

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

2 participants