If you start a default unit test project, save it to disk and run, it is in debug and the default unit test executes.
Change it to release, run and the result is ok, you get the page with the unit test.
Now change the compile options, set optimization = false. The browser launches to a blank page and changing optimization back to true does not restore.
At this point the dproj file has some issue in this section
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<TMSWebOptimization>1</TMSWebOptimization>
<TMSUnitTest>0</TMSUnitTest>
</PropertyGroup>
To recover the project, you must delete all lines then it works again.
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
</PropertyGroup>
Failing project Zip
UnitTestOptimization.zip (5.1 KB)