ManagedProjectConfiguration.IntermediateDirectory doesn't return expected value

Hi,

In my plugin I need to get project's current intermediate folder value.
For that I try to use ManagedProjectConfiguration.IntermediateDirectory property but it always return "obj/(Debug/Release)" even if I redirect intermediate directory in build properties.

This is the snippet I use:

ProjectImpl project = ...;

var configuration = project.ActiveConfiguration as ManagedProjectConfiguration;


string intermediateFolder = configuration.IntermediateDirectory.FullPath;


What I am doing wrong?
The same behavior is in R# 6.1 and R# 7.0


Kind Regards,
Ivan

2 comments
Comment actions Permalink

So nobody knows what is the problem?
Guys from JetBrains if you are here, could you please answer?

0
Comment actions Permalink

Hi Ivan. I've just tried your code against a project that has the IntermediateOutputPath property set in the .csproj file, and it works fine - it sees the right value. I did have to manually edit the .csproj file to add this though. Do you have an example csproj file that's not working for you? Here's the snippet I used:

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <IntermediateOutputPath>WHATEVER\Debug\</IntermediateOutputPath>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>JET_MODE_ASSERT;DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>


And I added a similar property in the Release property group.

Thanks
Matt
0

Please sign in to leave a comment.