How can I "save as" a solution??

G

Guest

I have been using C# 2005 Express to make class libraries for use in another
software program. Each version of this software has a different .NET API, so
maintaining multiple solutions of the same project for each version of the
software is neccessary.

How can I do a save as of the entier project? THe option seems to exist to
save as the .sln file, but that doesn't bring all the resources, source
files, and other files with it.

Maybe I am just missing something, but is there a way to make a complete
independent copy of a project without starting a new project and adding
copies of all the original project files?

Thanks in advance.
 
R

Ross Nelson

Not to sound like a jerk or anything, but have you considered just copying
the entire project folder?

The solution has a relative path to the project file, and the project file
is XML with all relative paths. Whenever I need to make changes that I
don't want affecting my live copy of the code, I just copy the entire folder
to another location and work on it. Microsoft's own source control doesn't
keep track of where a file was on the original system and lets you specify
where to check stuff out at. At least with 2003 and above (I'm assuming
it's been this way since day one, or at least the last many versions), paths
are relative so you can just copy the tree to another folder, another
computer, etc; without having to worry about path issues.
I have been using C# 2005 Express to make class libraries for use in another

software program. Each version of this software has a different .NET API,
so
maintaining multiple solutions of the same project for each version of the
software is neccessary.

How can I do a save as of the entier project? THe option seems to exist to

save as the .sln file, but that doesn't bring all the resources, source
files, and other files with it.

Maybe I am just missing something, but is there a way to make a complete
independent copy of a project without starting a new project and adding
copies of all the original project files?

Thanks in advance.
 
G

Guest

WHile this technically does work, I would like to name my files and classes
such that they are related to the version of the software, so that if I jsut
copy the folder, the file naming isn't really consistent.

I suppose this is rather trivial, but it makes it easier to keep track of in
the project explorer if the solutions have different names, and since I have
multiple projects that need to span multiple versions, I would like a way to
keep track of everything.
 
P

Peter Duniho

Matt S. said:
WHile this technically does work, I would like to name my files and
classes
such that they are related to the version of the software, so that if I
jsut
copy the folder, the file naming isn't really consistent.

Then you'll need to rename those files and classes after you copy the
folder. As far as I know, there's no one-command method for doing what you
want. But Visual Studio 2005 does a great job (IMHO, relative to past
versions) of allowing you to rename practically anything.

Since you want different names for everything anyway, and since even a "Save
As..." command wouldn't be likely to rename most things (I could see it
renaming the things directly tied to the solution name, but otherwise
everything else would be left alone anyway), it's not like it'd even be that
much more work to do it manually. You'd still have to go through the
solution and rename most things as needed anyway.

So, do that. Copy the whole folder for your solution, and then open the new
copy of the solution and rename things as you see fit.

There may be ways to automate the renaming part too, if you find it too
tedious to do everything. Whether that involves using the compiler-related
components in .NET or not, I don't know. Never tried to do it myself.

Pete
 
E

Ebbe Kristensen

Matt said:
WHile this technically does work, I would like to name my files and
classes such that they are related to the version of the software, so
that if I jsut copy the folder, the file naming isn't really
consistent.

I suppose this is rather trivial, but it makes it easier to keep
track of in the project explorer if the solutions have different
names, and since I have multiple projects that need to span multiple
versions, I would like a way to keep track of everything.

You are aware of the problems you make for yourself using only naming
conventions for versioning, aren't you? It is a solution that does not scale
very well, to say the least.

For keeping track of versions, whether it is for development progress or for
different capabilities, I'd strongly suggest using a Source Code Management
tool such as Subversion http://subversion.tigris.org. And since you are
obviously working in MS Windows, take a good look at
http://tortoisesvn.tigris.org as well.

Ebbe
 
M

Mark Wilden

But Visual Studio 2005 does a great job (IMHO, relative to past versions)
of allowing you to rename practically anything.

God, yes. I remember the hours-long nightmares involved in simply renaming a
project in VC++ 6.0 and earlier.

///ark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top