Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 876
Tomas Vana Avatar asked Apr 22 '10 10:04

Tomas Vana


People also ask

How do I change the build configuration platform in Visual Studio?

You can use the Configuration Manager dialog box to select or modify existing build configurations, or to create new ones. To open the Configuration Manager dialog box, in Solution Explorer, right-click on the solution node to open the shortcut menu for the solution, and then choose Configuration Manager.

How do I change a platform target from x86 to a CPU?

In the Configuration Manager dialog, open the Active solution platform drop-down list box and click <New> …. In the New Solution Platform dialog, select x64 in the Type or select the new platform drop-down list box. Select x86 in the Copy settings from drop-down list box. Click OK.

How do I change the solution platform in VS?

On the Build menu, click Configuration Manager. In the Active solution platform box, select the platform you want your solution to target, or select <New> to create a new platform.


1 Answers

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.

like image 78
Severedlimb Avatar answered Sep 25 '22 11:09

Severedlimb