1

After obfuscating my project, it stops working. I see the message "object reference not set to an instance of an object" when I start it up.

I tried using:

[assembly: Obfuscation(Feature = "optimization", Exclude = true)]
[System.Reflection.ObfuscationAttribute(Feature = "properties renaming")]
[Obfuscation(Exclude = true)]
 [System.Reflection.ObfuscationAttribute(Feature = "renaming", ApplyToMembers = true)]

Nothing helps. Does anyone have any ideas?

Andrii
  • 11
  • 2
  • Does this answer your question? [What is a NullReferenceException, and how do I fix it?](https://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) – Fildor Jul 06 '22 at 09:50
  • We can't debug an NRE remotely for you. If it happens only when obfuscating, this suggests that either your obfuscator has a bug where it breaks otherwise working code, or some reflection is going on you don't know about that breaks (despite your apparent attempts to prevent renaming). You can check the latter by comparing decompiled assemblies through `ildasm` or `ILSpy` (though the obfuscation will make it harder to do so, obviously). – Jeroen Mostert Jul 06 '22 at 09:52

0 Answers0