Tomas Vana
Tomas Vana

Reputation: 18775

Platform configuration for projects in VS 2010

I have a third-party project type in Visual Studio which for some reason only supports the .NET Platform configuration for the build, for all other (standard C#) projects in the solution I only have AnyCPU. Unfortunately, ever since upgrading to VS 2010 it produces following error when built :

Error 39 The OutputPath property is not set for project 'ReferencedBusinessProject.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='.NET'. 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. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 483 10 CustomTypeProject

It's pretty much descriptive in what is missing but I haven't found any way to fix it so far. Do you have any idea how this can be resolved or what can be the problem ?

Upvotes: 7

Views: 6902

Answers (1)

Severedlimb
Severedlimb

Reputation: 31

The .Net Platform must have been created for the project before you received it for transparency reasons check the project settings and if it's building any cpu then fix the project configuration. (Standards are AnyCPU, x86, x64, win32) etc...

I would suggest you right click on the ".sln" file and in configuration manager set the properties of what you would like build when you call a platform. I.e.

This sample is best served with a configuration called "Mixed Platforms"

csproj1    platform=AnyCPU configuration=debug  build checkbox (checked)
csproj2    platform=.net   configuration=debug  build checkbox (checked)

This will allow you to build with msbuild The call would be

msbuild my.sln /p:configuration="Debug" /p:platform="Mixed Platforms"

Both projects will build.

Upvotes: 3

Related Questions