Thread: renaming a project created with MSVC 6

  1. #1
    Madly in anger with you
    Join Date
    Nov 2005
    Posts
    211

    renaming a project created with MSVC 6

    well today I found that the name of the project that I am working on is in use by another program, so I will have to change its name before I release it.

    I have another name in mind, however, when I tried to rename my project, it didn't work quite like I expected it to. first let me run you through what I did:

    1. created a .RAR archive of the originally named project (for a backup, good thing I did this). my originally named project compiles, builds, and runs flawlessly.

    2. renamed the (.c, .h, .rc) files in the originally named project's directory to the new name.

    3. created a new empty Win32 Application project in msvc with the new name.

    4. copy and pasted the (renamed) files from the originally named project's directory into the newly named project's directory.

    5. added the files into the newly named project/workspace using msvc's file view.

    6. compiled and built the newly named project successfully, 0 errors 0 warnings.

    7. ran the newly named project, which works fine, until I activate a popup menu, which appears, but when I click one of the items on it (which is supposed to activate an open file dialog, which it does in the originally named project), I get an error from Windows stating that the application needs to be closed.

    I do not recieve this error in the originally named project. I can tell you that I am 100% sure that the renaming somehow caused the error. I did not change ANY code before or after the rename, I did not touch the code at all.

    can anyone please tell me if it is possible to rename a project created with msvc (without rewriting the whole thing), and if so, how to go about it without screwing it up like I have here?

    I really don't want to have to rewrite this program from scratch because of something as simple as a name change, it is easily over 300 lines, I have perfected the dialogs/controls in the resource file, and it is about 90% complete at this point.

    ANY help at all here would be greatly appreciated. thank you in advance!
    Last edited by Bleech; 10-30-2006 at 11:48 PM.

    Intel Core 2 Quad Q6600 @ 2.40 GHz
    3072 MB PC2-5300 DDR2
    2 x 320 GB SATA (640 GB)
    NVIDIA GeForce 8400GS 256 MB PCI-E

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Do you plan to release your project or just an executable?
    There is a simple way using project properties to change the target file name as you like. Why do you need to change the project name?

    BTW to change the WS name - you just rename the .dsw file and open it...
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Madly in anger with you
    Join Date
    Nov 2005
    Posts
    211
    I plan to release the executable along with the source code.

    I found a neat little program written in Perl called vsrename, it does exactly what I wanted and worked to do the job:

    http://www.codeproject.com/tools/vsrename.asp

    now everything is fine again, except for the Debug build for some very strange reason . if I use the Release build configuration, my program works fine, when I click the item in the popup menu it opens the open file dialog. but when I use the Debug build configuration, I get the same error I posted about in the above o_O .

    but ahh well, at least the Release copy of the EXE works.

    Intel Core 2 Quad Q6600 @ 2.40 GHz
    3072 MB PC2-5300 DDR2
    2 x 320 GB SATA (640 GB)
    NVIDIA GeForce 8400GS 256 MB PCI-E

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Please, suggest a project ….
    By Dragon227Slayer in forum Tech Board
    Replies: 1
    Last Post: 06-12-2004, 10:48 AM
  4. Remove ActiveX from VC++ project
    By cr_naik in forum Windows Programming
    Replies: 2
    Last Post: 07-02-2003, 11:15 AM
  5. MSVC problem just started
    By Eber Kain in forum C++ Programming
    Replies: 2
    Last Post: 11-30-2001, 04:32 PM