2

With .NET Framework DLLs, it is possible to disable optimizations using an .INI file with this contents, and the name matching the assembly followed by .ini:

[.NET Framework Debugging Control] 
GenerateTrackingInfo=1 
AllowOptimize=0

(See https://stackoverflow.com/a/12899739/402949)

I've tried that approach with a .NET Core app, and it doesn't work, which is not surprising since the syntax references ".NET Framework". Is there a similar method for disabling optimizations for a 3rd party .NET Core DLL?

Dan Solovay
  • 3,134
  • 3
  • 26
  • 55
  • In the source code, I found an enum `System.Reflection.AssemblyFlags`, with values `DisableJitCompileOptimizer` and `EnableJitCompileTracking`. These seem to correspond to the two Framework settings you posted. I cannot immediately figure out where to set those flags, though. (In a [project props file](https://stackoverflow.com/a/49601178/7711863)?) – Noah Dec 05 '21 at 22:22

0 Answers0