Thomas Matthews
Thomas Matthews

Reputation: 57728

Removing Debug and Release Configurations from Visual Studio 2008

I modified the default Debug configuation, so that the output directories resemble $(SolutionDir)$(PlatformName)/$(ConfigurationName).

Next, I created debug variations, DebugStatic and DebugDll, to be more explicit about the target being created. I created them by copying the Debug configuration.

In similar fashion, I created ReleaseDLL and ReleaseStatic from the modified Release configuration.

Using Configuration Manager, I removed the Debug and Release configurations.

The Debug and Release configurations still show up in the Batch Build window and also in the Configuration drop down box in the Property Pages window (displayed from right clicking on the project name, then selecting Properties).

How do I cleanse, wipe-out, erase, obliterate, the Debug and Release configurations?

(The ambiguity of Debug has caused me many weeks of problem solving, especially when accidentally combining a Win32 debug DLL in an X64 project)
(I searched the web and StackOverflow, but didn't find anything about completely removing those configurations.)

Upvotes: 1

Views: 7709

Answers (3)

Luiz Lima
Luiz Lima

Reputation: 101

You should clear the configurations within the .SLN file

GlobalSection(SolutionConfigurationPlatforms) = preSolution
    **Undesired Debug**|Any CPU = Debug|Any CPU
    Debug|Any CPU = Debug|Any CPU
    Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
    {CE94D753-36C5-45FA-870A-4D61DAC98B71}.**Undesired Debug** .Net Native (Debug)|Any CPU.ActiveCfg = Debug|Any CPU
    {4EFA1043-8E1B-4950-8167-C77ABE626F1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    {4EFA1043-8E1B-4950-8167-C77ABE626F1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
    {4EFA1043-8E1B-4950-8167-C77ABE626F1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
    {4EFA1043-8E1B-4950-8167-C77ABE626F1E}.Release|Any CPU.Build.0 = Release|Any CPU
    {28D34A34-6E07-4FC3-A4B3-C704C1C5C7CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    {28D34A34-6E07-4FC3-A4B3-C704C1C5C7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
    {28D34A34-6E07-4FC3-A4B3-C704C1C5C7CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
    {28D34A34-6E07-4FC3-A4B3-C704C1C5C7CE}.Release|Any CPU.Build.0 = Release|Any CPU
    {6B71D000-AC8D-49AF-ADA6-D96C7ECFF093}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    {6B71D000-AC8D-49AF-ADA6-D96C7ECFF093}.Debug|Any CPU.Build.0 = Debug|Any CPU
    {6B71D000-AC8D-49AF-ADA6-D96C7ECFF093}.Release|Any CPU.ActiveCfg = Release|Any CPU
    {6B71D000-AC8D-49AF-ADA6-D96C7ECFF093}.Release|Any CPU.Build.0 = Release|Any CPU
    {CE94D753-36C5-45FA-870A-4D61DAC98B71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    {CE94D753-36C5-45FA-870A-4D61DAC98B71}.Debug|Any CPU.Build.0 = Debug|Any CPU
    {CE94D753-36C5-45FA-870A-4D61DAC98B71}.Release|Any CPU.ActiveCfg = Release|Any CPU
    {CE94D753-36C5-45FA-870A-4D61DAC98B71}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection

Upvotes: 0

Rohit
Rohit

Reputation: 51

Note that to clear this from VS Batch build you must manually delete the property groups for DEBUG & RELEASE configurations from the project file XML.

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <OutputPath>bin\Debug\</OutputPath>
    <BuildScriptName>$(MSBuildProjectName).sql</BuildScriptName>
    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>

Upvotes: 1

fatihk
fatihk

Reputation: 7919

Solution and Project debug/release configurations are different.

Solution configurations may be controlled by configuration manager (Active Solution Configuration) and project configuration again can be controlled in the same manager for each project separately(project context)

enter image description here

In the image above, you can click on a project configuration, select edit and then you can remove the configuration.

Upvotes: 9

Related Questions