Search

Include directories are imported incorrectly by Bazis0

Closed
as Won't Fix Help for as Won't Fix

3
0
Sign in
to vote
Type: Bug
ID: 507467
Opened: 11/2/2009 1:33:14 AM
Access Restriction: Public
1
Workaround(s)
0
User(s) can reproduce this bug
When importing native C++ include paths from Visual Studio 2008, the user paths forcibly go before SDK paths, that prevents applications from being built if some header file names overlap.
-------------------
The bug was reopened, as the proposed workaround involves manually modifying the properties of every C++ project created by Visual Studio 2010. No workaround, how to make the added paths appear at the end of include list, as they were in Visual Studio 2008, was specified.
Details (expand)

Product Language

English

Version

Visual Studio 2010 Beta 2

Operating System

Windows Vista

Operating System Language

English

Steps to Reproduce

Install VS2008
Add some custom include paths, that have a "windows.h" file, but go AFTER the SDK includes.
Install VS2010
Try to compile any Windows application

Actual Results

The custom include paths are now in front of all include files with no visible possibility to move them. Windows C++ applications do not compile.

Expected Results

The custom include paths should have remained after SDK paths, or, at least, had a way to move them easily.
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

File Attachments
0 attachments
Sign in to post a comment.
Posted by Bazis0 on 11/17/2009 at 1:16 PM
Thank you for the workaround. The "View->Other Windows->Property Manager" was the key point. Never used that window before, so it was not obvious how to invoke it.
I would just like to point out that the described solution may be not intuitive for anyone encountering the problem, so, maybe, it is worth including in KB (googled for VS2010 include dirs with no feasible results before opening this bug).
P.S. After the bug was first marked as "as by design" and then reopened, I stopped receiving e-mail notifications about it (bug in the bugtracker? :-)). So, noticed your reply only today.
P.P.S. "Another include directory with conflicting names" was not an unrealistic problem; it was caused by using STLPort for some specific apps (perfectly working in VS2008 with its location being after standard ones).
Posted by Microsoft on 11/17/2009 at 9:25 AM
Since we have not heard from you in a week, we assume that this issue has been solved. Thus, we are resolving this bug. Please contact us if you continue to see this issue. Thank you for your feedback!

Richa Prasad
Program Manager
Visual Studio Platform Team
Posted by Li Shao [MSFT] on 11/11/2009 at 10:31 AM
Sorry I have not been clear enough :-). Here are the step by step instruction on how to change global settings.

1. Open up property manager by clicking on View.Property Manager.
2. Expand the project node and then the configuration|Platform nodes, you will see "Microsoft.cpp.<Platform>.users" file for each configuration|Platform. These are the files for the global settings, similar to the old tools/Options/VC++ Directories.
3. MultiSelect "Microsoft.cpp.<Platform>.users", right click and bring up the property page window
4. In the property page window, click on "VC++ Directories" in the left pane, add a new path after $(IncludePath) in the property grid delimited by a semicolon for "Include Directories"
5. Click the drop down for "Include Directories", choose "edit", in the dialog that comes up subsquently, use the Up down arrow in the upper pane to move the directories.

Li Shao, MSFT
Posted by Bazis0 on 11/11/2009 at 8:16 AM
I apologize if my question is stupid, but which property manager do you mean? In the "project properties" dialog there is nothing similar to .user.props. The Solution Explorer does not contain it either. Could you please describe the workaround in a step-by-step manner? I do get the idea about moving $(IncludePath) to the beginning, however, I don't get, how can I edit global settings.
Posted by Li Shao [MSFT] on 11/10/2009 at 12:01 AM
To change the settings for all other projects, you can open up the property manager, right click on the .user.props file to bring up the property page. Follow the workaround above to add new paths after $(IncludePath) and move the directory orders as you wish and save. This change will be applied to the system and to all projects. Please let us know if you are satisfied with this workaround.
Posted by Bazis0 on 11/8/2009 at 12:56 AM
Does it mean that once installed after Visual Studio 2008 (having the include paths AFTER default ones), I will have to modify EVERY project created with the next studio and the ONLY chance to get new projects generated correctly is to reinstall ENTIRE OPERATING SYSTEM???
If not, could you please provide step-by-step instructions on how to fix the default Visual Studio project settings after such a corrupt installation.

I would like to state again, that on VS2008 the new paths were AFTER the default ones and all projects compiled successfully.
Posted by Microsoft on 11/6/2009 at 5:39 PM
Hi,

Thanks for your feedback. Unfortunately, the new UI design provides this limitation and we will not be able to fix this for the final release of VS2010. To workaround this issue you could add new paths after $(IncludePath) in the property grid delimited by a semicolon.

Thanks,
Amit Mohindra
Project & Build Team.
Posted by Microsoft on 11/4/2009 at 10:49 PM
Thanks for your feedback.

We are rerouting 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.

Thank you
Posted by Microsoft on 11/4/2009 at 2:21 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)

If at any time your issue is closed unsatisfactorily, you may edit your issue via Connect and change the status to “Active.”

Thank you,
Visual Studio Product Team
Sign in to post a workaround.
Posted by Duke Huron on 5/17/2011 at 1:34 PM
Our shop has waaay too many projects (converted from VC6 and VS2005 to VS2010) to individually edit using the suggested fix, and we prefer modifying the include paths for _ALL_ VS2010 projects on our workstations. The following works for us on XP and Win7:

Locate and edit file (choose one for your platform):
Microsoft.Cpp.Win32.user.props
Microsoft.Cpp.x64.user.props

By example, on my workstations:
On XP, the path is: 'C:\Documents and Settings\<your username>\Local Settings\Application Data\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props'
On Win7, path is 'C:\Users\<your username>\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props'

We then edit '<IncludePath>' and '<LibraryPath>' to add our custom paths to the existing VS2010 paths. By example:
<IncludePath>D:\MyCustomIncludePath1;$(VCInstallDir)PlatformSDK\include;D:\MyCustomIncludePath2;$(IncludePath)</IncludePath>    

Wulla: all of our projects now compile, without having to manually edit each of them.