Home Dashboard Directory Help
Search

Using absolute path in ClCompile item prevents property pages from showing by Niels M Hansen


Status: 

Closed
 as Not Reproducible Help for as Not Reproducible


5
0
Sign in
to vote
Type: Bug
ID: 635294
Opened: 1/9/2011 4:50:17 PM
Access Restriction: Public
1
Workaround(s)
view
5
User(s) can reproduce this bug

Description

If I modify a VCXProj file by hand and modify the ClCompile items to point to the source files using absolute paths, I am unable to use the property pages for single source files.

This only affects those source files that have their name specified by an absolute path, not those specified by a relative path.

This most easily occurs when specifying the location of source files by the means of properties, such as something derived from $(MSBuildThisFileDirectory).
The problem occurs whether the path is specified using properties or without property expansions at all.

I have not tested this with non-C++ projects.
Details
Sign in to post a comment.
Posted by Ryan H. Kawicki on 1/21/2012 at 6:30 PM
I see that you have stated that this will be fixed in the next version of Visual Studio, but is there a hotfix that can be applied now to address this with Visual Studio 10?
Posted by Niels Dekker on 11/12/2011 at 3:37 AM
It looks like this problem only occurs when the source file and the .vcxproj file are located at the very same drive. (Please correct me if I'm wrong!) Which suggests the workaround that I just posted!
Posted by Microsoft on 1/11/2011 at 4:42 PM
Thanks you Niels M Hansen for reporting the issue. We have already fixed it and will be ready in the next release of Visual Studios.

Felix Huang
Visual C++
Posted by Microsoft on 1/9/2011 at 4:59 PM
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.
Posted by Niels Dekker on 11/12/2011 at 3:35 AM
Workaround: Suppose the .vcxproj file is located at drive 'D:'. Now associate 'D:\' with a new (unused) drive letter, for example 'V:', using cmd.exe:

subst V: D:\

Now open the project via drive 'V:', instead of drive 'D:'. And guess what, Visual Studio 2010 allows viewing the C/C++ properties of individual source files!

I found this workaround with the help from users and developers of CMake, a tool which generates project files for multiple platforms and compilers. See also "[CMake 0012570]: VS10 property pages for single source file gone", http://public.kitware.com/Bug/view.php?id=12570

Please let me know whether this workaround does the job for you as well!