By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,876 Members | 1,291 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,876 IT Pros & Developers. It's quick & easy.

How to change name of the project?

P: n/a

Hi,
What options do I have after putting a month in on writing a program
and so many functions in it and now I want to change the name of the
project with their file names?
Do I make the new project and hand copy over all the controls and code
or
is there a big red plastic "easy' button somewhere I can push?
Waiting for your favourable response.
Thanking you.

Renuka

Oct 7 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hello Renuka,
What options do I have [...] now [that] I want to change the
name of the project with their file names?
If you are using Visual Studio 2005, you can simply open up Solution
Explorer (the "project manager") and rename your project from there.
Alternatively, you could activate the project by selecting it in Solution
Explorer and choosing File/Save MyProject1 As.

However, when you first create your project in Visual Studio, the name of
the project also becomes the default namespace. If you change your project's
name, the namespace won't change. You have to change this using refactorings
(or more manually using the Edit/Find and Replace/Replace in Files command).

As for the files that belong to the project, you have the same alternatives
as renaming the project. That is, the easiest way is to simply rename the
files one by one in Solution Explorer.

Finally, if your solution contains only one project, you might want to also
change the name of your solution in Solution Explorer.

All in all Solution Explorer is your friend here.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Oct 7 '06 #2

P: n/a
Hi,

Is there some way of being able to rename the project and the namespace
by using command line options. Or do you know if there is a tool
available that I could use.

The basic issue is that I have a template project that can be used by
various people, but when they rename the project, the namespaces dont
automatically change. I am looking to automate this process for the
benefit of the users.

Narasimham

Jani Järvinen [MVP] wrote:
Hello Renuka,
What options do I have [...] now [that] I want to change the
name of the project with their file names?

If you are using Visual Studio 2005, you can simply open up Solution
Explorer (the "project manager") and rename your project from there.
Alternatively, you could activate the project by selecting it in Solution
Explorer and choosing File/Save MyProject1 As.

However, when you first create your project in Visual Studio, the name of
the project also becomes the default namespace. If you change your project's
name, the namespace won't change. You have to change this using refactorings
(or more manually using the Edit/Find and Replace/Replace in Files command).

As for the files that belong to the project, you have the same alternatives
as renaming the project. That is, the easiest way is to simply rename the
files one by one in Solution Explorer.

Finally, if your solution contains only one project, you might want to also
change the name of your solution in Solution Explorer.

All in all Solution Explorer is your friend here.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Oct 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.