I have a Visual Studio C# .exe project where I have edited the .csproj to define different assembly names depending on the build configuration:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ConfigADebug|AnyCPU'">
<AssemblyName>MyNameA</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'ConfigBDebug|AnyCPU'">
<AssemblyName>MyNameB</AssemblyName>
</PropertyGroup>
This works fine during compilation, but when I change for example from ConfigADebug to ConfigBDebug on the IDE and start debugging, I get an error message that indicates MyNameA.exe was not found. But in reality, I am debuging MyNameB.exe
The only workaround I found so far (also mentioned in a comment in this thread) is to reload the project after changing the configuration.
Is there any way I can do that without having to reload the project?