Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Sat, 20 Sep 2008 12:29:20 -0500,    group: microsoft.public.vstudio.general        back       


Visual Studio 2008 Project Management   
Is there any simple and reasonable way of having proper directory 
management inside a project in Visual Studio 2008 for a C++ project?

Here's what I mean. I'm used to using Eclipse under linux and when I 
create a project, I tend to create certain directory structures to put my 
source files in.

Example:

project/core
project/data
project/ui
project/ui/widgets
project/ui/dialogs
project/ui/models

That's part of the directory tree on one of my projects. Anything that 
uses the data access layer goes into /data, all widgets go into /ui/
widgets, dialogs into /ui/dialogs, etc. That way, when I need to work on 
a file I can easily and quickly find it without having to wade through 
one huge list.

Then if I want to add a class to a certain location, I just right click 
the location, pick add class. Done. 

Well, Visual studio apparently doesn't seem to agree with me on this 
philosophy. When I go to create a subdirectory in the project tree, all I 
can create is a "Filter" which isn't an actual directory. And when I go 
to create a class, it wants to put them all into the root directory. I 
have to manually override the location by typing it in for BOTH the 
header and cpp file. 

This is utterly ridiculous. How does Microsoft expect someone to use 
their tools when I can't even easily properly structure my project? Do 
they seriously expect me to have a few hounded source files all in the 
root directory of my project? 

Please someone tell me there is something I'm just simply missing and not 
seeing...

Thanks,

-- 
Stephan
1986 Pontiac Fiero GT

君の事思い出す日なんてないのは
君の事忘れたときがないから
date: Sat, 20 Sep 2008 12:29:20 -0500   author:   Stephan Rose

Re: Visual Studio 2008 Project Management   
Stephan Rose a écrit :
> Is there any simple and reasonable way of having proper directory 
> management inside a project in Visual Studio 2008 for a C++ project?

hmmm, NO.

> Well, Visual studio apparently doesn't seem to agree with me on this 
> philosophy. When I go to create a subdirectory in the project tree, all I 
> can create is a "Filter" which isn't an actual directory.

filters are a stupid response for a long time & still missing feature.
previous studio env. also lets you create these no-sense-aliases but
each name can be used only once, after 10 years (95-05) you can use
the same name more than once, drag & drop of files or folders from
the explorer is also supported (thanks to 10 years of hard works)
but of course all dragged files are all inserted in the filter-drop
target without any respect of the source tree, any w/o creating the
necessary new filters ... so point 1.

> And when I go to create a class, it wants to put them all into the
> root directory. I have to manually override the location by typing
>  it in for BOTH the header and cpp file.

this wizard was fully redesigned to be as stupid as the older.
you can indeed type-in the full path twice or browse it twice,
you can also type-in a inexistent path and of course get an
insult-alert (not have the path built for you) ... so point 1.

> This is utterly ridiculous. How does Microsoft expect someone to use
> their tools when I can't even easily properly structure my project?

they simply say: it's the way you MUST work, and apparently they
success; I never figure out if they are that convincing or if most
of developers are that ... not imaginative (I can't say stupid).
for 10 years I'm screaming in my side ... and loop to point 1.

> Please someone tell me there is something I'm just simply missing
> and not seeing...

don't miss to forward, in case.

Sylvain.
date: Sun, 21 Sep 2008 01:22:31 +0200   author:   Sylvain SF

Re: Visual Studio 2008 Project Management   
On Sun, 21 Sep 2008 01:22:31 +0200, Sylvain SF wrote:

> Stephan Rose a écrit :
>> Is there any simple and reasonable way of having proper directory
>> management inside a project in Visual Studio 2008 for a C++ project?
> 
> hmmm, NO.
> 
>> Well, Visual studio apparently doesn't seem to agree with me on this
>> philosophy. When I go to create a subdirectory in the project tree, all
>> I can create is a "Filter" which isn't an actual directory.
> 
> filters are a stupid response for a long time & still missing feature.
> previous studio env. also lets you create these no-sense-aliases but
> each name can be used only once, after 10 years (95-05) you can use the
> same name more than once, drag & drop of files or folders from the
> explorer is also supported (thanks to 10 years of hard works) but of
> course all dragged files are all inserted in the filter-drop target
> without any respect of the source tree, any w/o creating the necessary
> new filters ... so point 1.
> 
>> And when I go to create a class, it wants to put them all into the root
>> directory. I have to manually override the location by typing
>>  it in for BOTH the header and cpp file.
> 
> this wizard was fully redesigned to be as stupid as the older. you can
> indeed type-in the full path twice or browse it twice, you can also
> type-in a inexistent path and of course get an insult-alert (not have
> the path built for you) ... so point 1.
> 
>> This is utterly ridiculous. How does Microsoft expect someone to use
>> their tools when I can't even easily properly structure my project?
> 
> they simply say: it's the way you MUST work, and apparently they
> success; I never figure out if they are that convincing or if most of
> developers are that ... not imaginative (I can't say stupid). for 10
> years I'm screaming in my side ... and loop to point 1.
> 
>> Please someone tell me there is something I'm just simply missing and
>> not seeing...
> 
> don't miss to forward, in case.
> 

Well there seems to be one minor thing one can do. When you look at the 
project tree, at the top there is a small icon that enables a "Show all 
files" option.

Click that and the "Create Filter" at least changes to "Create Folder" 
and you actually get to directly see the directory structure in the 
project.

However, when adding a new class it's still stupid and puts the class in 
the project's root directory. However, you can then at least afterward 
drag it to the correct location and it'll be physically moved there. 
Annoying, but I can live with it.

However, there are still dozens of other features missing in VS that 
Eclipse has that I've been so taking for granted I'm going nuts them not 
being there.

I think it's time for me to write an e-mail to the CDT developers and beg 
them that they get a working version of CDT with full support for the MS 
Compilers / Debuggers so that I can switch to Eclipse for windows 
development. While I have no problems with GCC, MingW's gcc version is 
always so outdated it's ridiculous and I don't know how much faith I 
place in MingW's windows libraries. At least for a commercial project I 
don't even wanna go there.

-- 
Stephan
1986 Pontiac Fiero GT
1992 Suzuki Kan-o-tuna ('till I can get my R1)

君の事思い出す日なんてないのは
君の事忘れたときがないから
date: Sat, 20 Sep 2008 23:41:37 -0500   author:   Stephan Rose

Re: Visual Studio 2008 Project Management   
Stephan Rose wrote:
> Well there seems to be one minor thing one can do. When you look at the 
> project tree, at the top there is a small icon that enables a "Show all 
> files" option.
> 
> Click that and the "Create Filter" at least changes to "Create Folder" 
> and you actually get to directly see the directory structure in the 
> project.
> 
> However, when adding a new class it's still stupid and puts the class in 
> the project's root directory. However, you can then at least afterward 
> drag it to the correct location and it'll be physically moved there. 
> Annoying, but I can live with it.
> 
> However, there are still dozens of other features missing in VS that 
> Eclipse has that I've been so taking for granted I'm going nuts them not 
> being there.
> 
> I think it's time for me to write an e-mail to the CDT developers and beg 
> them that they get a working version of CDT with full support for the MS 
> Compilers / Debuggers so that I can switch to Eclipse for windows 
> development. While I have no problems with GCC, MingW's gcc version is 
> always so outdated it's ridiculous and I don't know how much faith I 
> place in MingW's windows libraries. At least for a commercial project I 
> don't even wanna go there.

Stephan:

You know, I didn't know about this "Show all files" option. I don't think this 
was available in VC6 (which is where I first learned Visual Studio). I too have 
been frustrated by this feature of always adding new items to the project 
folder, and this "Folder view" does make things somewhat better. But I would 
have to say that when you right-click a sub-folder and Add some item, the fact 
that it gets added to the project folder by default is a bug rather than a feature.

On the other hand, when I looked briefly at Eclipse I found the "file-centric" 
view of the IDE even more irritating. What I wanted to do was just test compile 
my exiting code under GCC on Linux, and the fact that it seemed that I had to 
make a copy in order to import it was very alien to me. [It would have been less 
irritating if I had the code under Subversion source control, but I didn't.]

-- 
David Wilkinson
Visual C++ MVP
date: Sun, 21 Sep 2008 09:38:21 -0400   author:   David Wilkinson

Re: Visual Studio 2008 Project Management   
On Sun, 21 Sep 2008 09:38:21 -0400, David Wilkinson wrote:

> Stephan Rose wrote:
>> Well there seems to be one minor thing one can do. When you look at the
>> project tree, at the top there is a small icon that enables a "Show all
>> files" option.
>> 
>> Click that and the "Create Filter" at least changes to "Create Folder"
>> and you actually get to directly see the directory structure in the
>> project.
>> 
>> However, when adding a new class it's still stupid and puts the class
>> in the project's root directory. However, you can then at least
>> afterward drag it to the correct location and it'll be physically moved
>> there. Annoying, but I can live with it.
>> 
>> However, there are still dozens of other features missing in VS that
>> Eclipse has that I've been so taking for granted I'm going nuts them
>> not being there.
>> 
>> I think it's time for me to write an e-mail to the CDT developers and
>> beg them that they get a working version of CDT with full support for
>> the MS Compilers / Debuggers so that I can switch to Eclipse for
>> windows development. While I have no problems with GCC, MingW's gcc
>> version is always so outdated it's ridiculous and I don't know how much
>> faith I place in MingW's windows libraries. At least for a commercial
>> project I don't even wanna go there.
> 
> Stephan:
> 
> You know, I didn't know about this "Show all files" option. I don't
> think this was available in VC6 (which is where I first learned Visual
> Studio). I too have been frustrated by this feature of always adding new
> items to the project folder, and this "Folder view" does make things
> somewhat better. But I would have to say that when you right-click a
> sub-folder and Add some item, the fact that it gets added to the project
> folder by default is a bug rather than a feature.

Thinking back, I think it started to become available in 2003. The bug 
has been present since then. In my opinion, inexcusable.

> 
> On the other hand, when I looked briefly at Eclipse I found the
> "file-centric" view of the IDE even more irritating. What I wanted to do
> was just test compile my exiting code under GCC on Linux, and the fact
> that it seemed that I had to make a copy in order to import it was very
> alien to me. [It would have been less irritating if I had the code under
> Subversion source control, but I didn't.]

I suppose I'm used to it and think nothing of it. 

I'm currently testing various add-ins for visual studio to see if I can 
make it behave in a better way. Visual Assist seems to help out with a 
lot of the shortcomings but it's syntax highlighting is still sub-par 
compared to that of Eclipse. At least though it does introduce working 
intellisense, though a bit too intrusive in my opinion. Eclipse shuts up 
until I ask it for intellisense whereas this plugin automatically pops 
things up all the time. A little annoying but I suppose I can get used to 
it.

Of course, the $250 price tag for the add-in just to get most of the 
functionality that Eclipse offers for free is really a pain.

-- 
Stephan
1986 Pontiac Fiero GT
1992 Suzuki Kan-o-tuna ('till I can get my R1)

君の事思い出す日なんてないのは
君の事忘れたときがないから
date: Sun, 21 Sep 2008 17:06:23 -0500   author:   Stephan Rose

Re: Visual Studio 2008 Project Management   
Stephan Rose wrote:
> On Sun, 21 Sep 2008 09:38:21 -0400, David Wilkinson wrote:
> 
>> Stephan Rose wrote:
>>> Well there seems to be one minor thing one can do. When you look at the
>>> project tree, at the top there is a small icon that enables a "Show all
>>> files" option.
>>>
>>> Click that and the "Create Filter" at least changes to "Create Folder"
>>> and you actually get to directly see the directory structure in the
>>> project.
>>>
>>> However, when adding a new class it's still stupid and puts the class
>>> in the project's root directory. However, you can then at least
>>> afterward drag it to the correct location and it'll be physically moved
>>> there. Annoying, but I can live with it.
>>>
>>> However, there are still dozens of other features missing in VS that
>>> Eclipse has that I've been so taking for granted I'm going nuts them
>>> not being there.
>>>
>>> I think it's time for me to write an e-mail to the CDT developers and
>>> beg them that they get a working version of CDT with full support for
>>> the MS Compilers / Debuggers so that I can switch to Eclipse for
>>> windows development. While I have no problems with GCC, MingW's gcc
>>> version is always so outdated it's ridiculous and I don't know how much
>>> faith I place in MingW's windows libraries. At least for a commercial
>>> project I don't even wanna go there.
>> Stephan:
>>
>> You know, I didn't know about this "Show all files" option. I don't
>> think this was available in VC6 (which is where I first learned Visual
>> Studio). I too have been frustrated by this feature of always adding new
>> items to the project folder, and this "Folder view" does make things
>> somewhat better. But I would have to say that when you right-click a
>> sub-folder and Add some item, the fact that it gets added to the project
>> folder by default is a bug rather than a feature.
> 
> Thinking back, I think it started to become available in 2003. The bug 
> has been present since then. In my opinion, inexcusable.
> 
>> On the other hand, when I looked briefly at Eclipse I found the
>> "file-centric" view of the IDE even more irritating. What I wanted to do
>> was just test compile my exiting code under GCC on Linux, and the fact
>> that it seemed that I had to make a copy in order to import it was very
>> alien to me. [It would have been less irritating if I had the code under
>> Subversion source control, but I didn't.]
> 
> I suppose I'm used to it and think nothing of it. 
> 
> I'm currently testing various add-ins for visual studio to see if I can 
> make it behave in a better way. Visual Assist seems to help out with a 
> lot of the shortcomings but it's syntax highlighting is still sub-par 
> compared to that of Eclipse. At least though it does introduce working 
> intellisense, though a bit too intrusive in my opinion. Eclipse shuts up 
> until I ask it for intellisense whereas this plugin automatically pops 
> things up all the time. A little annoying but I suppose I can get used to 
> it.
> 
> Of course, the $250 price tag for the add-in just to get most of the 
> functionality that Eclipse offers for free is really a pain.
> 


When you create a new (whatever) right click the folder into which you 
want the item created.  It will then create the new object in that folder.

LS
date: Mon, 22 Sep 2008 10:08:04 -0400   author:   Lloyd Sheen a@b.c

Re: Visual Studio 2008 Project Management   
Lloyd Sheen wrote:
> When you create a new (whatever) right click the folder into which you 
> want the item created.  It will then create the new object in that folder.


LS:

Unless I/Stephan are missing something, this "seems to work" in the default 
"filter view", but the the actual location of the new files on disk is always 
the project folder.

In the "folder view" it does not even seem to work. The new files are created in 
the project folder, and this is where they are displayed in Solution Explorer. 
This has to be a bug.

As Stephan says, though, the Folder View has the advantage that you can drag the 
files to the desired place, and they are actually moved on disk.

-- 
David Wilkinson
Visual C++ MVP
date: Mon, 22 Sep 2008 10:24:39 -0400   author:   David Wilkinson

Re: Visual Studio 2008 Project Management   
David Wilkinson wrote:
> Lloyd Sheen wrote:
>> When you create a new (whatever) right click the folder into which you 
>> want the item created.  It will then create the new object in that 
>> folder.
> 
> 
> LS:
> 
> Unless I/Stephan are missing something, this "seems to work" in the 
> default "filter view", but the the actual location of the new files on 
> disk is always the project folder.
> 
> In the "folder view" it does not even seem to work. The new files are 
> created in the project folder, and this is where they are displayed in 
> Solution Explorer. This has to be a bug.
> 
> As Stephan says, though, the Folder View has the advantage that you can 
> drag the files to the desired place, and they are actually moved on disk.
> 

I am not sure what filter/folder view is.  I only use Solution Explorer 
and that works as I said.  It has since VS 2003.

LS
date: Mon, 22 Sep 2008 11:30:21 -0400   author:   Lloyd Sheen a@b.c

Re: Visual Studio 2008 Project Management   
Lloyd Sheen wrote:
> I am not sure what filter/folder view is.  I only use Solution Explorer 
> and that works as I said.  It has since VS 2003.

LS:

Read all Stephan's posts in this thread (especially the second one).

In the default Solution Explorer view, the things that look like folders bear no 
relation to the directory structure, and are actually called "Filters". You can 
add items to any filter (as you describe), but the actual location on disk is 
always the project folder.

When a project is selected, if you click the (confusingly named) "Show all 
files" icon at the top of the Solution Explorer, then the display changes to 
"Folder view", which displays the actual directory structure of the files in 
your project. But if you add an item to one of the folders, it is actually added 
to the project directory.

Try it!

[I did not know about this Folder View before reading this thread.]

-- 
David Wilkinson
Visual C++ MVP
date: Mon, 22 Sep 2008 13:00:35 -0400   author:   David Wilkinson

Re: Visual Studio 2008 Project Management   
David Wilkinson wrote:
> Lloyd Sheen wrote:
>> I am not sure what filter/folder view is.  I only use Solution 
>> Explorer and that works as I said.  It has since VS 2003.
> 
> LS:
> 
> Read all Stephan's posts in this thread (especially the second one).
> 
> In the default Solution Explorer view, the things that look like folders 
> bear no relation to the directory structure, and are actually called 
> "Filters". You can add items to any filter (as you describe), but the 
> actual location on disk is always the project folder.
> 
> When a project is selected, if you click the (confusingly named) "Show 
> all files" icon at the top of the Solution Explorer, then the display 
> changes to "Folder view", which displays the actual directory structure 
> of the files in your project. But if you add an item to one of the 
> folders, it is actually added to the project directory.
> 
> Try it!
> 
> [I did not know about this Folder View before reading this thread.]
> 
David,

	I do what I said constantly.  That is why I am surprised at your 
results.  First thing I do with any project is turn on show all files 
(one of those MS defaults I don't understand).  From there if I right 
click the folder and then add (not from the project node) I get the item 
in the correct folder all the time.

LS
date: Mon, 22 Sep 2008 14:28:09 -0400   author:   Lloyd Sheen a@b.c

Re: Visual Studio 2008 Project Management   
Lloyd Sheen wrote:
>     I do what I said constantly.  That is why I am surprised at your 
> results.  First thing I do with any project is turn on show all files 
> (one of those MS defaults I don't understand).  From there if I right 
> click the folder and then add (not from the project node) I get the item 
> in the correct folder all the time.

LS:

Ah, yes, it works for Add New Item. But try it for Add Class.

-- 
David Wilkinson
Visual C++ MVP
date: Mon, 22 Sep 2008 14:42:30 -0400   author:   David Wilkinson

Re: Visual Studio 2008 Project Management   
David Wilkinson wrote:
> Lloyd Sheen wrote:
>>     I do what I said constantly.  That is why I am surprised at your 
>> results.  First thing I do with any project is turn on show all files 
>> (one of those MS defaults I don't understand).  From there if I right 
>> click the folder and then add (not from the project node) I get the 
>> item in the correct folder all the time.
> 
> LS:
> 
> Ah, yes, it works for Add New Item. But try it for Add Class.
> 
That works fine.  If you do not have a node selected and do not use the 
context menu there is no way for VS to know where to put it other than 
under the project folder.

LS
date: Mon, 22 Sep 2008 15:30:04 -0400   author:   Lloyd Sheen a@b.c

Re: Visual Studio 2008 Project Management   
Lloyd Sheen wrote:
>> Ah, yes, it works for Add New Item. But try it for Add Class.
>>
> That works fine.  If you do not have a node selected and do not use the 
> context menu there is no way for VS to know where to put it other than 
> under the project folder.


LS:

Not for me (in VS2008). I have a node (sub-folder) selected, and I right-click 
it and select New class. The .h and .cpp files are created in the project folder.

Anybody else?

-- 
David Wilkinson
Visual C++ MVP
date: Mon, 22 Sep 2008 15:55:19 -0400   author:   David Wilkinson

Re: Visual Studio 2008 Project Management   
David Wilkinson wrote:
> Lloyd Sheen wrote:
>>     I do what I said constantly.  That is why I am surprised at your
>> results.  First thing I do with any project is turn on show all files
>> (one of those MS defaults I don't understand).  From there if I right
>> click the folder and then add (not from the project node) I get the
>> item in the correct folder all the time.
> 
> LS:
> 
> Ah, yes, it works for Add New Item. But try it for Add Class.

I think noboy wanted to change the class wizard, to make it possible to
store the .h and .cpp - File somewhere else than in the porject root :-)

Just my thoughts :-)

Best regards,
Nicolas
date: Mon, 22 Sep 2008 21:50:25 +0200   author:   Nicolas Pavlidis

Re: Visual Studio 2008 Project Management   
David Wilkinson wrote:
> Lloyd Sheen wrote:
>>> Ah, yes, it works for Add New Item. But try it for Add Class.
>>>
>> That works fine.  If you do not have a node selected and do not use 
>> the context menu there is no way for VS to know where to put it other 
>> than under the project folder.
> 
> 
> LS:
> 
> Not for me (in VS2008). I have a node (sub-folder) selected, and I 
> right-click it and select New class. The .h and .cpp files are created 
> in the project folder.
> 
> Anybody else?
> 
Did not notice you were using C++.  I use C# and VB so maybe there is a 
difference there.

LS
date: Mon, 22 Sep 2008 17:12:11 -0400   author:   Lloyd Sheen a@b.c

Re: Visual Studio 2008 Project Management   
On Mon, 22 Sep 2008 17:12:11 -0400, Lloyd Sheen wrote:

> David Wilkinson wrote:
>> Lloyd Sheen wrote:
>>>> Ah, yes, it works for Add New Item. But try it for Add Class.
>>>>
>>> That works fine.  If you do not have a node selected and do not use
>>> the context menu there is no way for VS to know where to put it other
>>> than under the project folder.
>> 
>> 
>> LS:
>> 
>> Not for me (in VS2008). I have a node (sub-folder) selected, and I
>> right-click it and select New class. The .h and .cpp files are created
>> in the project folder.
>> 
>> Anybody else?
>> 
> Did not notice you were using C++.  I use C# and VB so maybe there is a
> difference there.
> 

There is a difference there. It works correctly in the .Net projects but 
not in the C++ projects.

-- 
Stephan
1986 Pontiac Fiero GT
1992 Suzuki Kan-o-tuna ('till I can get my R1)

君の事思い出す日なんてないのは
君の事忘れたときがないから
date: Mon, 22 Sep 2008 22:20:05 -0500   author:   Stephan Rose

Re: Visual Studio 2008 Project Management   
Stephan Rose wrote, on 2008-09-20 13:29:
> Is there any simple and reasonable way of having proper directory
> management inside a project in Visual Studio 2008 for a C++ project?
>
> Here's what I mean. I'm used to using Eclipse under linux and when I
> create a project, I tend to create certain directory structures to put my
> source files in.

[...snippage...]

> This is utterly ridiculous. How does Microsoft expect someone to use
> their tools when I can't even easily properly structure my project? Do
> they seriously expect me to have a few hounded source files all in the
> root directory of my project?

> Please someone tell me there is something I'm just simply missing and not
> seeing...

Have you ever right clicked on a project name in the Solution Explorer 
pane? Then you chose Add, then New Folder.

I do that all the time.
date: Fri, 24 Oct 2008 12:27:03 -0400   author:   Cory Albrecht

Re: Visual Studio 2008 Project Management   
Cory Albrecht wrote:
> Have you ever right clicked on a project name in the Solution Explorer 
> pane? Then you chose Add, then New Folder.
> 
> I do that all the time.

Cory:

Did you read the whole thread?

-- 
David Wilkinson
Visual C++ MVP
date: Fri, 24 Oct 2008 13:17:44 -0400   author:   David Wilkinson

Re: Visual Studio 2008 Project Management   
David Wilkinson wrote, on 2008-10-24 13:17:
> Cory Albrecht wrote:
>> Have you ever right clicked on a project name in the Solution Explorer
>> pane? Then you chose Add, then New Folder.
>>
>> I do that all the time.
>
> Cory:
>
> Did you read the whole thread?

Doh! I made the stupid newbie error of thinking that the thread was a 
current one rather than almost a month old! *hangs head in shame*
date: Fri, 24 Oct 2008 18:32:32 -0400   author:   Cory Albrecht

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us