InjectModuleInitializer icon indicating copy to clipboard operation
InjectModuleInitializer copied to clipboard

any support for .net core

Open pinopino opened this issue 6 years ago • 4 comments

when i use this for a .net core dll(.net core 2.1), it stop works and just output these lines:

Failed to resolve assembly: 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

pinopino avatar Jul 18 '19 09:07 pinopino

I have a similar issue, I have an assembly which defines some attribute and an enum as constructor argument (both in assembly 'a'). Then in assembly 'b' I have this attribute as an assembly attribute.

Now the injection fails also with an assembly not found message (same as with .NET Core/.NET Standard, we experienced that issue as well)

I have locally patched the code to accept additional assembly resolve folders. Then adding the folder of assembly 'a' to the arguments solves the issue for us.

Program.cs Injector.cs

I'll look into the contributing sections to see what would be the best way to contribute these changes.

Regards, Mark

mvw684 avatar Feb 17 '20 09:02 mvw684

Hi,

I have forked the InjectModuleInitializer and added support for adding assembly search paths on the commandline. See https://github.com/mvw684/InjectModuleInitializer/ should I submit a pull request for that change? Not sure what is required in form of additional tests/documentation.

mvw684 avatar Jun 22 '21 09:06 mvw684

I'm not the maintainer for this anymore, so I can't answer whether you should make a pull request, but I did notice that you have a typo in the regex on line 60 in program.cs: https://github.com/mvw684/InjectModuleInitializer/commit/d6d27c38d0549d58c55ca179a9a20d5766fc4695#diff-0b69b473fe937040615d69f606751f61ddbc2e3a1849360ff2456c22afe88c0bR60

It says 'assemnby' instead of 'assembly'.

einaregilsson avatar Jun 24 '21 09:06 einaregilsson

Typo is fixed

mvw684 avatar Jul 20 '21 08:07 mvw684