Disable Android Debugging on Release Mode: AssemblyInfo.cs vs .csproj file?

I need to disable debugging on my Xamarin.Android project before I release it. The official docs recommend doing this in the AssemblyInfo.cs file. However, I also notice that the .csproj file for my Android project, under android options, I can uncheck "Enable developer instrumentation (debugging and profiling)."

My question is, what is the difference between these two approaches? Do they both disable debugging for a release configuration? I'd prefer to disable debugging in the .csproj file, as I'm running into an exception when I try to set it in AssemblyInfo.cs ("Application cannot have both a type with an [Application] attribute and an [assembly:Application] attribute.")

Thanks!

Best Answer

Answers

  • stefanhkstefanhk Member ✭✭

    Thanks! Yeah, it turns out I have a MainApplication class that inherits Application, and I set the Debuggable attribute there. :)

Sign In or Register to comment.