ManagedProjectConfiguration.IntermediateDirectory doesn't return expected value


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,

Comment actions Permalink

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

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' ">

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


Please sign in to leave a comment.