Jak skonfigurować pośredni Katalog wyjściowy w C#?
Próbuję uporządkować swoją przestrzeń roboczą i chcę, aby moje obiekty pośrednie były umieszczane w folderze ..\build\obj
w stosunku do mojego .plik csproj. Więc wstawiam:
<IntermediateOutputPath>..\build\obj\Debug</IntermediateOutputPath>
W .plik csproj. Obiekty pośrednie są teraz umieszczane w tym miejscu, gdy rozwiązanie jest budowane, ale problem polega na tym, że katalog obj jest nadal tworzony w katalogu the .plik csproj jest w (coś na efekt obj\Debug\TempPE
), gdy rozwiązanie jest otwarte. Do czego służy ten katalog i jak można przenieść to?
3 answers
Możesz spróbować to zrobić (nie zapominaj, że istnieją sekcje Debug i Release, które będą używane w zależności od typu kompilacji, którą kierujesz):
<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>
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2010-07-22 16:49:50
Zrób to jak Microsoft:
<PropertyGroup>
<IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2013-07-30 11:49:12
Użyłem:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>$(OBJDIR)\$(SolutionName)\bin\$(Configuration)\</OutputPath>
<BaseIntermediateOutputPath>$(OBJDIR)\$(SolutionName)\obj\$(Configuration)\</BaseIntermediateOutputPath>
<IntermediateOutputPath>$(BaseIntermediateOutputPath)\</IntermediateOutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
(w VS11 Beta, FWIW) i działa dobrze.
OBJDIR na mojej maszynie wskazuje na e:\BuildOutput
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2012-03-15 17:05:01