Visual Studio设置Solution/Project输出目录

用Visual Studio做项目开发时,编译过程会产生大量临时文件,这些文件默认都存储在工程目录下的obj子目录内。
另外,工程编译出的成果也会放在工程目录下的bin子目录内。
这些文件通常都很多、很琐碎、频繁变化,对备份影响很大。而且,还会经常被人不小心提交到svn服务器上去。非常烦人!
 
按照如下所示,修改.csproj文件,可将多工程的编译临时文件从代码文件中清理出来。还给开发环境一个清爽。
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>$(SolutionDir)output\debug</OutputPath>
    <BaseIntermediateOutputPath>\tmp\$(ProjectGuid)\</BaseIntermediateOutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <DocumentationFile>
    </DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>$(SolutionDir)\output\release</OutputPath>
    <BaseIntermediateOutputPath>\tmp\$(ProjectGuid)\</BaseIntermediateOutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
</PropertyGroup>




posted @ 2012-11-29 21:20  江南制造  阅读(1141)  评论(1编辑  收藏  举报