I work on two different projects. One is an asp.net web project, the other an addin for an arcmap.exe. For debugging the addin the option "Use Managed Compatibility Mode" must be set, otherwise an error occurs when starting the programm that should load the extension (see Start ArcMap AddIn for .net 4.5). Starting the asp.net project needs a long time, so code editing during running is desired. But when "Use Managed Compatibility Mode" is enabled, code editing while debugging does not work.
So the solution for me until now was to change the option after loading the project. Is there any possibility to have the option set on a projects basis?
The solution for now is without an extension. As described in Switching to Managed Compatibility Mode in Visual Studio 2013 it is possible to add a configuration in the .csproj file by hand:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
...
<DebugEngines>{351668CC-8477-4fbf-BFE3-5F1006E4DB1F}</DebugEngines> <!-- add this line -->
...
</PropertyGroup>
This has to be done for the "Startup Project". After setting the property for the project, The option "Use Managed Compatibility Mode" can be unchecked in Settings - Debug.
来源:https://stackoverflow.com/questions/54415990/visual-studio-2017-option-use-managed-compatibility-mode-per-project