[ACCEPTED]-the outputpath property is not set for this project" error-buildconfiguration

Accepted answer
Score: 94

Usually this happens when the OutputPath 10 property of the project file is blank. Project 9 files are just MSBuild files. To edit in Visual 8 Studio: Right click on the project, pick 7 "Unload project" then right click 6 on the unloaded project and select "Edit 5 ...".

Look for the Release-Versionincrement 4 property group. It should look something 3 like

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-VersionIncrement|AnyCPU' ">

The important one there it the OutputPath, does 2 it exist for your project file? If not add 1 it and try again.

Score: 80

I have also seen this error when our build 4 agent was configured to run platform "Any CPU" (with 3 spaces as displayed in Visual Studio) rather 2 than "AnyCPU" (one word as specified in the project 1 file).

Score: 37

I had the same problem when I used MSBuild 2 first. My solution is: use the OutputPath 1 property definitely. Like this:

msbuild XXX.csproj /p:OutputPath=bin\Debug.
Score: 11

In our case we were running a build script 7 on our HP developer boxes. HP have some 6 environment variables they've set up for 5 their own purposes and one of them is PLATFORM 4 (used, apparently, for "HP Easy Setup").

Deleting 3 the PLATFORM environment variable worked.

You 2 could also future-proof your build script 1 by specifying the platform, i.e.
msbuild /p:Platform=AnyCPU.

Score: 9

If Visual Studio specifically complains 4 that "Platform='BPC'" then you can easily 3 fix this by removing the "Platform" environment 2 variable.

Delete this bad boy.

Now restart Visual Studio and you 1 are good to go.

Score: 6

Like "Richard Dingwall" hinted, the problem is related to 7 VS using the display version of "Any CPU" instead of the 6 MSBuild version which actually reads "AnyCPU"

Go 5 into Build/New Build Definition or Edit 4 Build Definition -> Process -> Configurations 3 to build, open the configuration selection 2 dialog and in "Platform" instead of selecting "Any CPU", manually 1 add "AnyCPU"

Score: 6

As was said, OutputPath must be set AND it must be 1 placed before <Import Project="$(WixTargetsPath)" /> in .wixproj file

Score: 4

I've removed Platform environment variable (was 1 BNB or smth like that). The problem is gone.

Score: 4

I was adding the x64 platform to my solution 24 today, when I ran into this issue.

In my 23 case, the error read:

Built $/ProjectDirectory/ProjectName.csproj 22 for default targets. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 21 (484): The OutputPath property is not set 20 for project ProjectName.csproj'. Please 19 check to make sure that you have specified 18 a valid combination of Configuration and 17 Platform for this project. Configuration='Debug' Platform='x64'. You 16 may be seeing this message because you are 15 trying to build a project without a solution 14 file, and have specified a non-default Configuration 13 or Platform that doesn't exist for this 12 project.

I knew the OutputPath should be fine, since 11 this was an existing, working VS solution. So 10 I moved to the next hint--"a valid combination 9 of Configuration and Platform".

Aha! Visual 8 Studio is trying to build Configuration='Debug', Platform='x64'. Looking at my 7 project file, I realized that x64 was not 6 listed as one of the possible platforms. In 5 other words, I had the below entries (shortened):

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
      . . .  
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
      . . .

Easy 4 fix then: just add x64 entries!

I copy/paste'd 3 the x86 entries, and changed them to use 2 x64. Notice I also modified the paths so 1 these don't overwrite x86 builds:

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
      . . .
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
      . . .
Score: 3

I strugged with this for a while and then 3 also unloaded, built, and then reloaded 2 the offending project in the solution, and 1 then MSBuild functioned correctly.

Score: 3

In my case (VS2010) I removed string in 9 the "OutputPath" box that is on "Build" tab 8 and left it blank. Then I rebuilt the solution. Build 7 was successful and VS has inserted current 6 directory "./" into the "OutputPath". I 5 replaced current directory "./" with my 4 path ("bin\x64\Release\" -- suffice to say 3 that this is exact folder path that was 2 VS was complaining in the first place) and 1 rebuild was successful again.

Score: 3

As Scott S, I've had to delete the "Platform" environment variable.

Then restart VS, and 1 it's ok : no more error message...

Score: 2

The issue had to do with my project configuration. Here 7 is the scenario:

Solution A references:

Project 6 X references Project Y
Project Y

Solution 5 B (the one I am trying to build) references:

Project 4 X Project Z

My solution was to create a 3 configuration with the same name for Solution 2 A, rebuild it, and then rebuild Solution 1 B. This fixed the problem.

Score: 2

I had this same error message. It was caused 5 by having a reference to a project that 4 was unloaded and not required by the linker 3 (otherwise it would have failed at compile 2 time). Removing the offending reference 1 solved the issue.

Score: 1

In my case the OutputPath was set property 2 in the project files. But unloading, reloading 1 and then rebuilding fixed it.

Score: 1

If anyone is getting this one in his NCrunch 4 logs, check if the PropertyGroup defining the values 3 'Debug'/'Release' and 'AnyCPU'/'x86' located 2 before the property groups using those values 1 in their condition.

    <!-- this one first -->
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">

Worked for me.

Score: 1

When I added new solution configuration 13 in my solution, I got an error, "The OutputPath 12 property is not set for project X. Please 11 check to make sure that you have specified 10 a valid combination of Configuration and 9 Platform for this project. Configuration='QA' Platform='AnyCPU'. This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform. ProjectY".

In 8 my case issue was due to highlighted part 7 of the error description. Project X part 6 of my solution was having a project reference 5 to ProjectY of another solution(different 4 branch).

I've resolved this issue by modifying 3 project X to use project reference to ProjectY 2 in the current solution. Hope this helps 1 someone having similar issue.

Score: 0

In my case the new "PropertyGroup" XML block 3 was generated at the bottom of document. I've 2 just replaced it after other "PropertyGroup" tags 1 and this resolved the problem.

Score: 0

I created a new project in a new solution 7 which references to existing projects. This 6 error occurs when I add an existing project 5 (say project 1) and try to build without 4 adding other projects that project 1 references 3 to.

Just make sure all the relating projects 2 are added to the new solution and the error 1 disappears.

Score: 0

I had the same error, so I looked on project 4 settings and there in "Build" section is 3 "Build output path" option. And value was 2 empty. So I filled in "bin\" value a error 1 disappeared. It solved my problem.

Score: 0

If you decide to set OutputPath as a param, and 3 your path is like: bin\Release\\ then remember to add 2 \ at the end like that: /p:OutputPath=bin\Release\\\\ it took me a while 1 to realize it was the case

Score: 0

I had the same problem. I fixed it by clean 1 and rebuilt the projects.

Score: 0

I had the same problem, and the only solution 16 that helps was to set the Build Configuration 15 Manually in each NCrunch Project.

Open the 14 NCrunch Window, where you can see the Status 13 of each Build and where you can see that 12 the build failes. Right click on the project 11 that fails to build and click on "configure 10 selected component" there you see under 9 "Build Settings" the property "Use build 8 confoguration" set it to e.g. "Debug" and 7 the property "Use build platform" set it 6 to e.g. "AnyCPU". (Please note that the 5 build and configuration settings you set 4 must exist in your konfigration Settings)

Do 3 this for all of your projects, but not for 2 your test project. After this everything 1 works fine for me.

Score: 0

I had the same problem, I fixed it by adding 6 missing Configurations to the project that 5 was failing.

BUILD -> Configuration Manager 4 ->

Under Configuration Column Add

Note: This 3 only happened to be because I have custom 2 configuration and newly created projects 1 didn't have the configuration.

Score: 0

In my case, I tried to move the property 3 group that contained my custom configuration 2 down below the standard ones. It solved 1 it for me.

Score: 0

Just had this with VS2015 Professional:

The 15 OutputPath property is not set for project 14 'xxxxx.csproj'. Please check to make sure 13 that you have specified a valid combination 12 of Configuration and Platform for this 11 project.

This is also multi-project juggling 10 between debug/release and different targets. I 9 had been fiddling with build configurations 8 at some point and I know that can mess up 7 VS, so I pulled them back from the repo. Still 6 no good. OutputPath was set, there were 5 no longer any diffs with a known good state 4 so there was definitely something wrong 3 with my local installation.

Opened up VS2015 2 installer and clicked "Repair", and voila... back 1 to normal (so far at least!)

Score: 0

For me it was a line in the NuGet package 7 configuration. Get rid of everything package 6 related in your project file and see come 5 back to life (save the edits). Than build 4 it up again part by part. I brought it down 3 to this line which I had to remove:

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

I got 2 the problem after an update of NuGet packages 1 (mainly FxCop analyzer stuff).

Score: 0

For me it was my .csproj file having multiple 2 groups

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">



was empty.

Filled with bin\debug and the 1 error went away.

More Related questions