johnvisiomvp

Life with Visio and other Microsoft Toys!

Whats’ in a name?

leave a comment »

You are working on your app and you realize that Test233 is not a great name for an app, so how do you change it. Just rename the file? Not quite.

You can select the project in Visual Studio and chose the rename function, but this is only the start. Next is to go through and do a replace of the old name with the new in the code. Visual Studio was nice enough in the beginning to take the name you originally chose and nicely placed it around your project. Places like the namespace. If you leave the app and find the sln file, it still has the old name. Normally the *.sln and *.suo files are in a folder with a similarly named folder that contains the solution. Rather than the obvious of renaming the files, delete the *.sln and the *.suo file and open the solution folder and find *.csproj file (You did remember to do a backup BEFORE attemting this?) Click on it and start Visual Studio. Change one of the files and then save. Visual Studio will nicely recreate the solution file with the proper name and let you select where you want it placed. Usually back up one level where the original was.

The next step is to make sure the Project properties are set to use the new name and NameSpace.

Now run the app and it …. crashes? Verify the Startup object is correct.

Any guesses on what I was doing for the past hour?   This is not the definitive explanation, but that is what I needed to do and I was caught by not having a Startup object.

John Marshall… Visio MVP       Visio.MVPs.org

Advertisements

Written by johnvisiomvp

July 7, 2011 at 10:39 pm

Posted in Windows Phone 7, WP7

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: