Removing Debug and Release Configurations from Visual Studio 2008

假装没事ソ 提交于 2019-12-06 15:34:59

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)

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

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>

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!