Search

MSBuild gets confused with build configuration and starts generating output path errors by CoolDadTx

Closed
as External Help for as External

1
0
Sign in
to vote
Type: Bug
ID: 518181
Opened: 12/4/2009 9:30:58 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
I have a solution that I've been working with for a while. I recently modified the configurations isolate the VS2010 builds from VS2008 so I could switch between the two easier. Now MSBuild gets confused during builds and seems to be using the wrong configurations for some projects in the solution.

I'm attaching the simplified solution without any source files but with the existing configuration/platform settings. The attached solution will not build correctly using Debug.VS2010 - Mixed Platform. It generates a "bad output path" error for three of the projects.
Details (expand)

Product Language

English

Version

Visual Studio 2010 Beta 2

Operating System

Windows 7

Operating System Language

English

Steps to Reproduce

1) Open the attached solution in VS2010
2) If necessary switch to the Debug.VS2010 - Mixed Platform configuration
3) Rebuild the solution

Actual Results

MSBuild generates 3 "bad output path" errors for the projects.
Opening the project settings confirms that the paths are correct.
Opening Configuration Manager confirms that the appropriate project configurations are selected for the solution configuration.

Expected Results

The build should succeed since the project configurations are correct.
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

File Attachments
File Name Submitted By Submitted On File Size  
BadOutputPath.zip (restricted) 12/4/2009 -
Sign in to post a comment.
Posted by Microsoft on 12/8/2009 at 4:05 PM
Hi Taylor
The problem here is that you have vs2010 projects that are still referencing (via ProjectReference inside them) vs2008 projects instead of their vs2010 counterparts.

This may have been caused by doing an upgrade on a solution containing projects that referenced other projects that weren't in the solution: VS didn't find these other projects and therefore didn't upgrade them. OR it may have been that VS converted everything, but perhaps you renamed some of the projects without renaming the matching project references within other projects?

Thus, when it went to build, the vs2010 project P2P'd to the VS2008 project with the current Config / Platform, which of course didn't exist in the VS2008 project, which led to the error:

C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(539,9): error : The OutputPath property is not set for this project. Please check to make sure that you have specified a valid Configuration/Platform combination. Configuration='Debug.VS2010' Platform='AnyCPU'

[[More technical details: ideally, projects outside the solution will build without inheriting their parent's Configuration/Platform; however that only happens if the reference was unresolved (because that's how we tell how the project is outside the solution). However, in this case, although the referenced project was outside the solution, it shared the exact same GUID as a project that was inside the solution (since it's just an upgraded version of itself), so the project was actually resolved. The only thing I can think of that would have allowed us to avoid this problem would be if we made a point of checking that the path is the same even if there's a GUID match. And even then, he would have then been continuing to build the old projects without comment, which is hardly ideal ...]]

To fix the problem, please go in and edit the project references to point to upgraded projects files, or put another way, project files that are in the solution.

Thanks,
Sara

Posted by Microsoft on 12/8/2009 at 3:18 AM
Thanks for your feedback.

We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution.
These specialized experts will follow-up with your issue.
Posted by Microsoft on 12/5/2009 at 1:05 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.