I have a solution that has successfully built in Team City for more than a year. A developer added two projects to the solution and immediately we received the following errors:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(483, 9): The OutputPath property is not set for project 'Compass.Communication.Server.Config.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='DEV' Platform='AnyCPU'. 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.
Project Compass.Communication.Server.Config\Compass.Communication.Server.Config.csproj failed. C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(483, 9): The OutputPath property is not set for project 'Compass.Communication.Server.Processor.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='DEV' Platform='AnyCPU'. 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 have tried most everything I could find about any CPU vs. AnyCPU and lots of other stuff with no success. Here is the project file for the first one:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5FC19B70-7DB4-4D8A-B33F-748528E5A042}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Compass.Communication.Server.Config</RootNamespace>
<AssemblyName>Compass.Communication.Server.Config</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<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>
<DocumentationFile>bin\Debug\Compass.Communication.Server.Config.XML</DocumentationFile>
<PlatformTarget>AnyCPU</PlatformTarget>
</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>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CommunicationConditionalElement.cs" />
<Compile Include="CommunicationConditionalSection.cs" />
<Compile Include="CommunicationConfigurationManager.cs" />
<Compile Include="CommunicationCriterionElement.cs" />
<Compile Include="CommunicationCriterionSection.cs" />
<Compile Include="CommunicationElementExtensions.cs" />
<Compile Include="CommunicationIntroductionElement.cs" />
<Compile Include="CommunicationIntroductionSection.cs" />
<Compile Include="CommunicationSectionElement.cs" />
<Compile Include="CommunicationSectionSection.cs" />
<Compile Include="CommunicationTypeElement.cs" />
<Compile Include="CommunicationTypeSection.cs" />
<Compile Include="GenericConfigurationElementCollection.cs" />
<Compile Include="RefElement.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Compass.Communication.Entities\Compass.Communication.Entities.csproj">
<Project>{25B8C709-0574-496E-BD1D-5F4DF966F258}</Project>
<Name>Compass.Communication.Entities</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
I had a similar issue couple of weeks ago and in my case issue was caused because of space between "Any CPU"
You need to make sure that "AnyCPU" does not contain any space wherever you are using in your build definition.
Regards
Just resolved similar issue by manually replacing 'AnyCPU" by "x64" inside .csproj file:
<Platform Condition=" '$(Platform)' == '' ">x64</Platform\>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With