18

I have a build in our Team Foundation server which gives this warring:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (610): The OutputPath property is not set for project 'Plugin.DeploymentTool.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Release' Platform='x86'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.

I can't find any solution or why i get this error. But then i look at the generated zip file, the Binary folder are empty. I have tried to use the x86, x64 and Any CPU, to se if there are are any difference, which there are not.

If i look into the project file, it looks okay.

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
mortenstarck
  • 2,713
  • 8
  • 43
  • 76
  • What configuration have you configured for the build definition to use? Looking at the message, the Build is trying to use x86, and you only have PropertyGroups for AnyCPU. – DaveShaw Oct 22 '13 at 11:15
  • @DaveShaw. Then i look a the summary of the build without the configuration, it's using Debug | AnyCPU. but if i configure the configuration if gives. me the error. I the project it's declared to use the Debug | Any CPU. – mortenstarck Oct 22 '13 at 12:08

3 Answers3

46

I have found a solution to the problem, which turns out to be a pretty simple one. The default Configuration in TFS Build look like this: Configuration: Release, Platform: Any CPU

But in Visual Studio 2012 it looks like this: Configuration: Release, Platform: AnyCPU

The solution is to remove the space between Any and CPU in the TFS Build Platform. Now it works perfectly.

UPDATE

The issue has been corrected in VS2013.

mortenstarck
  • 2,713
  • 8
  • 43
  • 76
14

For Visual Studio Team Services (was Visual Studio Online) integrated builds, @mortenstarck's answer does the trick as well. In the variables of your build, specify anycpu for BuildPlatform.


build variables


The variable is referenced in the build step:

build step

Esther Fan - MSFT
  • 8,276
  • 4
  • 27
  • 25
Brett
  • 8,575
  • 5
  • 38
  • 51
12

In addition to the other answers, I have noticed this:

  1. For building a .sln (solution), you need the space so it has to be any cpu (notice the space).

  2. For building a .csproj, you DO NOT need the space so it has to be anycpu.

CodingYoshi
  • 25,467
  • 4
  • 62
  • 64