I want to share that dumb feeling not discussing drag and drop
(almost) but I wasn't all that surprised to learn the dragged folder
remained empty.
The snippet I showed was pulled from a .sln file. If dragging were to
resolve this issue the contents of the .sln file would have to be
modified
including the reference to what I may have mistakenly referred to as
a CLSID Key [1].
What happened running the ProjectItem.AddFromDirectory macro?
--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL
http://www.metromilwaukee.com/clintongallagher/
[1]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/com/htm/reg_6vjt.asp
Adam Clauss said:
No... heh the macro wasn't the easy way. And I cannot believe I
did
not think about this. Just... drag the folder in. Duh...
Before I figured out the dragging method, I did start looking at a
macro, and it looks like there is one
(ProjectItem.AddFromDirectory()).
I also may have discovered a bug in VS. In both using that Macro
and
dragging the folders into the project from explorer, if I only
drug the root folder, and drug it so that it would be a top level
folder in the project structure - nothign except the top folder
itself got added!
All of the files got copied over into the solution directory, as I
expected - but none of them were actually in the project. The
top folder got created in the project, but it was empty.
in
message news:%
[email protected]...
The easy way *is* with a macro. There's probably a macro that
somebody has built already and there's lots of samples that can
be modified.
Google: "visual studio"+"macro"
If its only for one solution it may not be timely to do so but
otherwise you can look at it as an oppontunity to finally learn
how to do something useful like recursing a directory of files.
I've got to take on this task myself someday so try to understand
I'm not talking down to you.
You might also consider backing up the .sln file and using C# and
the framework to modify the .sln file directly but you'll still
have
to
recurse the directories and subdirectories. Study this snippet of
a .sln file and note that once the project is created all of the CLIDs
are identical throughout the entire .sln file. All you'd have to
do
is
write
a template and fill in the blanks using values from your recurser.
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "315C11",
"
http://localhost/70315QUE/315C11/315C11.csproj
", " {2F7BB741-BEA0-4243-937E-8C69FBF71649}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Isn't being a real software developer exciting?
--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL
http://www.metromilwaukee.com/clintongallagher/
Perhaps, but I was wondering if there was some way, already built-in
maybe, that would save me the time as I've never done a macro
for VS.
wrote
in
message Isn't that what macros are supposed to help get done? Have you
tried?
--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software
Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL
http://www.metromilwaukee.com/clintongallagher/
I have a folder containing many subfolders (and subfolders
and....)
all containing various .cs files. Is there any "easy" way to
get them all added to the solution. Preferable would be
that
the
folders are actually created in the Solution Explorer so that I
can find things easily.
Its easy to select multiple files out of a single folder,
but
not
recursively into subfolders.
Any ideas?