I create a VSIX extension for Visual Studio, which adds a custom drop-down menu. I need the value from this menu to apply to the .csproj property of the file without changing the file itself, like the configuration menu. For example:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>DEBUG;TRACE;</DefineConstants>
</PropertyGroup>
-- default content of .csproj. When I selecting "Debug" from Visual Studio configuration drop-down menu, Configuration property value switch to Debug without changing .csproj file and '#if DEBUG'-block in code file is activated.
I have multiply projects in solution and each project have this property. If I overwrite .csproj, then these changes will be monitored by the source control, which I do not want. Help please.