Another newbie question. I wrote a word processing application which began as just an online school class exercise which just kept on growing until I now have something I'd like to publish and share with family and friends. The namespace for my project began as "Lesson9Prog1" and that's the name it still has. I ran a publishing test and then installed it via the setup.exe program. Now I have an application installed called "Lesson9Prog1". For obvious reasons, this is not the name I want my installed application to have. I'd like to know how I can publish my application with a name such as "Bob's Word Processor" or something similar. Can I just go into the program and change the name of the namespace without screwing everything up or will MS Visual C# Express edition make all the necessary adjustments to the project if I do that? How can I publish my app with a name that's different than the namespace? THANKS!!
Bob C.
Loading
Bob CongdonPosted Mar 19, 2010, 10:01 PM
Thanks for the reply, but either you misunderstood what I really wanted to do, or my lengthy explanation & question just didn't make any sense. It was probably the latter. I figured out for myself that all I had to do was change the assembly name on the properties page. All I was looking for here was to change the name of my application when it was published from the default (Lesson9Prog1 - the namespace name) to something more appropriate. I did a little investigating today in the MSDN help files and discovered the answer. Sorry for the confusion!
Sam HobbsPosted Mar 18, 2010, 10:28 PM
First, close the project. You also might need to close Visual Studio but that will probably not be necessary. Then create a directory named the way you want the project to be named. Then copy all files from the old project to the new project. So you will still have the old project intact and you will be able to try things. Then open the new project in VS. Rename whatever you want to rename. Rename files using the Solution Explorer when you need to rename a file. So for example rename Form1.cs to FormMain.cs. VS will rename related files as approriate. VS will also ask if you want to rename the corresponding class; this is where VS makes things easy. Click Yes to rename the class. You might need to do a build at this point, to give VS a chance to get updated.
Then, for any other names you want to change, right-click on the name and choose "Refactor | Rename". If you rename objects that way, VS will nearly certaily get it done right the way you want it.
Finally, go into the project's properties and look around there. Before changing anything, be sure you have configuration set for all.