7

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 ?

4
  • adding/editing OutputPath in the .csproj file doesn't solve the problem?
    – alexandrul
    Oct 19, 2010 at 12:05
  • That would probably solve the (part of the) problem, if I would put an unconditional OutputPath there (for all the configurations). The problem is however that the configuration is not recognized and as a result all conditioned properties ignored.
    – Tomas Vana
    Oct 19, 2010 at 14:25
  • Have you tried create a 'new solution' with empty project placeholders which ressemble what you really have. Then look / edit / modify the real .csproj in accordance to the 'placeholder'.csproj files? you are probably missing large sections in the .csproj file which specify different configurations for different builds. I'm no MSBUILD expert, but it's just some XML after all. Feb 13, 2011 at 12:43
  • Not sure if it can help: you can create new configurations in build->configuration menu. (x86 & x64). If not all projects are "any cpu" the batch builder (msbuild) won't be able to match them properly..
    – Sauleil
    Mar 14, 2011 at 20:13

1 Answer 1

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.