Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The OutputPath property is not set for this project

When I try to compile my project from x86 debug mode in Visual Studio 2008. I am getting this error. When I looked at the property group of the project that complained, I see output path is set.

Here is the property group section for that .csproj file

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
  <DebugSymbols>true</DebugSymbols>
  <OutputPath>bin\x86\Debug\</OutputPath>
  <DefineConstants>DEBUG;TRACE</DefineConstants>
  <BaseAddress>285212672</BaseAddress>
  <FileAlignment>4096</FileAlignment>
  <DebugType>full</DebugType>
  <PlatformTarget>x86</PlatformTarget>
 <ErrorReport>prompt</ErrorReport>

Can any one shed the light on this?

NOTE: When I compiled this Debug and Any CPU it worked.

UPDATED: Error 1 The OutputPath property is not set for this project. Please check to make sure that you have specified a valid Configuration/Platform combination. Configuration='Debug' Platform='x86'

like image 291
Amzath Avatar asked Jan 31 '12 20:01

Amzath


3 Answers

I had exact same error after adding a new configuration via ConfigurationManager in Visual Studio.

It turned out when the 'Production' configuration was added for the whole solution (and each project) the OutputPath element was not added to the .csproj files.

To fix, I went to the Build tab in project properties, changed OutputPath from \bin\Production\ to \bin\Production (deleted trailing \) and saved changes. This forced creation of the OutputPath element in the .csproj file and the project has built successfully.

Sounds like a glitch to me.

like image 133
Roman Gudkov Avatar answered Nov 06 '22 20:11

Roman Gudkov


You can see this error in VS 2008 if you have a project in your solution that references an assembly that cannot be found. This could happen if the assembly comes from another project that is not part of your solution but should be. In this case simply adding the correct project to the solution will solve it.

Check the References section of each project in your solution. If any of them has a reference with an red x next to it, then it you have found your problem. That assembly reference cannot be found by the solution.

The error message is a bit confusing but I've seen this many times.

like image 29
dblood Avatar answered Nov 06 '22 21:11

dblood


If you are using WiX look at this (there is a bug) http://www.cnblogs.com/xixifusigao/archive/2012/03/20/2407651.html

Sometimes new build configurations get added to the .wixproj file further down the file, that is, separated from their sibling config definitions by other unrelated XML elements.

Simply edit the .wixproj file so that all the <PropertyGroup> sections that define your build configs are adjacent to one another. (To edit the .wixproj in VS2013 right click on project in Solution Explorer, Unload project, right-click again->Edit YourProject.wixproj. Reload after editing the file.)

like image 29
george Avatar answered Nov 06 '22 20:11

george