views:

80

answers:

1

I'm trying to organize my workspace, and want my intermediate objects to be put in the ..\build\obj folder in relation to my .csproj file. So I put:

<IntermediateOutputPath>..\build\obj\Debug</IntermediateOutputPath>

in the .csproj file. The intermediate objects are now put in that location when the solution is built, but the problem is that an obj directory is still created in the directory the .csproj file is in (something to the effect of obj\Debug\TempPE) when the solution is opened. What is this directory for, and how can a relocate it?

+1  A: 

You could try do this (don't forget that there are Debug and Release section which will be used depending on what type of build you are targeting):

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    ...
    <BaseIntermediateOutputPath>..\build\obj</BaseIntermediateOutputPath>
    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    ...
    <BaseIntermediateOutputPath>..\build\obj</BaseIntermediateOutputPath>
    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
Darin Dimitrov
I've tried this. An obj\ directory is still being generated in the same directory as the .csproj file. When I build, the intermediates go to the directory specified by the .csproj file, but for some reason this obj\ directory is still being generated in the .csproj file directory as well.
blachniet