How to force ASP.NET Core 5 source code to not be optimized
问题 I'm trying to debug the Antiforgery code in the ASP.NET Core 5 framework. I have built the code successfully using the instructions in https://github.com/dotnet/aspnetcore/blob/master/docs/BuildFromSource.md using the Debug configuration. I have added the source code project to my test project and referenced it. I've checked that the Configuration is set to Debug. I've made sure that "Suppress JIT Optimizations" has been checked. "Optimize Code" in Project Properties -> Build, is unchecked