Open cameron-foreflight opened 3 years ago
Could you please run PEVerify on the release mode assembly?
Getting a bunch of The system cannot find the file specified.
errors whenever I run PEVerify on the assembly, both with Tracer and without. Don't have a lot of experience using this tool, what specifically are you looking for?
The reason for the invalid program exception is that Tracer messes up the IL code when adding trace functionality. PEVerify tool can check if the IL code and the metadata in the assembly are correct and can point out any problem. PEVerify can be run from developer's command prompt if you're using Visual Studio. I need to figure out what construct in your code causes this problem.
Not finding a lot on PEVerify, so just don't know what is causing all of the The system cannot find the file specified.
errors when I run from command prompt. I am getting this both without Tracer weaved in and with Tracer weaved in.
Another option would be to add VerifyAssembly="true" to the Weavers element in the FodyWeavers.xml. It should run this PE verification after weaving and output the problem.
Added that and built, and now have a lot of Unable to resolve token.(Error: 0x80131869)
messages. Using ILSpy, I'm able to go in and see those methods and constructors and ensure they exist though.
Should PEVerify, and Tracer.Serilog for that matter, work for UWP projects?
Theoretically yes, but I've never tried it. Are you using some special language construct where this error appears? Could you give some minimal reproduction source code so I can debug into it? Anyway I'll create a small UWP project and check if it can be rewritten with tracer.
No special language construct that I'm aware of. I'll see if I can put something together, but won't have a lot of time this week. Were you able to check Tracer with a small UWP project?
I created a minimal UWP (just some buttons on a screen) and it works both in debug and release mode. One difference is that I used NLog, not Serilog. I'll check if it makes any difference.
Running my project in Release mode with Tracer.Serilog.Fody weaved in causes this exception on startup. When I remove the weaver from my FodyWeavers.xml or switch to Debug mode, the app continues running just fine.