Conversion from VS 2003 to VS 2005 doesn't update .pdb

J

JT

Hi,

I'm not sure where the problem is, but I think it's related to the .pdb
file. I had a class library created in VS 2003 and decided to convert
it to a VS 2005 project/solution. It seemed to go okay, and still was
successful when building, but I later had to make a modification. When
I tried, it wouldn't recognize the changes. I put in a breakpoint
right before my modification and then when stepping through it, it
jumped right over the new line of code.

Before renaming my original 2003 project directory, when I stepped
through the project, it would open the 2003 version of the source file
and walk through that. After renaming it, it didn't open the file, but
still made highlights in the new source file as if it was reading the
old file. My .pdb file contains references to the 2003 project
directory. I can't find any settings that would indicate the project
directory of choice. I can't seem to shake this problem. I have many
class libraries that are going to go through this process, so I don't
want to recreate these projects from scratch, even if I'm just copy and
pasting code files.

Has anyone experienced this? Does anyone have a fix? Is this a
registry problem <gulp>? Is there more to it than the pdb file?

Thanks.
 
O

Otis Mukinfus

Hi,

I'm not sure where the problem is, but I think it's related to the .pdb
file. I had a class library created in VS 2003 and decided to convert
it to a VS 2005 project/solution. It seemed to go okay, and still was
successful when building, but I later had to make a modification. When
I tried, it wouldn't recognize the changes. I put in a breakpoint
right before my modification and then when stepping through it, it
jumped right over the new line of code.

Before renaming my original 2003 project directory, when I stepped
through the project, it would open the 2003 version of the source file
and walk through that. After renaming it, it didn't open the file, but
still made highlights in the new source file as if it was reading the
old file. My .pdb file contains references to the 2003 project
directory. I can't find any settings that would indicate the project
directory of choice. I can't seem to shake this problem. I have many
class libraries that are going to go through this process, so I don't
want to recreate these projects from scratch, even if I'm just copy and
pasting code files.

Has anyone experienced this? Does anyone have a fix? Is this a
registry problem <gulp>? Is there more to it than the pdb file?

Thanks.
I'm pretty sure you can delete the pdb files and they will be regenerated when
you recompile in 2.0.

Anyone disagree with that?
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 
C

Carl Daniel [VC++ MVP]

JT said:
Hi,

I'm not sure where the problem is, but I think it's related to the .pdb
file. I had a class library created in VS 2003 and decided to convert
it to a VS 2005 project/solution. It seemed to go okay, and still was
successful when building, but I later had to make a modification. When
I tried, it wouldn't recognize the changes. I put in a breakpoint
right before my modification and then when stepping through it, it
jumped right over the new line of code.

Before renaming my original 2003 project directory, when I stepped
through the project, it would open the 2003 version of the source file
and walk through that. After renaming it, it didn't open the file, but
still made highlights in the new source file as if it was reading the
old file. My .pdb file contains references to the 2003 project
directory. I can't find any settings that would indicate the project
directory of choice. I can't seem to shake this problem. I have many
class libraries that are going to go through this process, so I don't
want to recreate these projects from scratch, even if I'm just copy and
pasting code files.

Has anyone experienced this? Does anyone have a fix? Is this a
registry problem <gulp>? Is there more to it than the pdb file?

It's probably best to do a CLEAN on your project in VS2003 before converting
it to VS2005. That way you're assured that all of the by-products of the
build come from the 2005 compiler and there are no leftovers.

-cd
 
J

JT

Otis:
Thanks for the suggestion. I already tried that and it gets recreated
just as it was (or at least still using the 2003 directory).

Carl:
I am not aware of the Clean functionality, although I saw it in 2005
when I right-clicked on the solution in Solution Explorer. I'll have
to look that up. For the rest of the people out there, can you explain
what it does?

Any other suggestions? I'll let you know if the Clean helps.
 
C

Carl Daniel [VC++ MVP]

JT said:
Otis:
Thanks for the suggestion. I already tried that and it gets recreated
just as it was (or at least still using the 2003 directory).

Carl:
I am not aware of the Clean functionality, although I saw it in 2005
when I right-clicked on the solution in Solution Explorer. I'll have
to look that up. For the rest of the people out there, can you
explain
what it does?

Clean deletes all of the by-products of build - in particular, .DLL, .EXE,
..LIB, .OBJ, .PDB... the exact set of files deleted by Clean depends on the
project type. Hopefully it helps your situation.

-cd
 
J

JT

Carl,

I looked for the Clean Solution command in the VS 2003 IDE but couldn't
find it. There is a devenv command with a /clean switch but I couldn't
get it to do anything. I may have been doing something wrong, but it
came back with 0s for all three results. That was for both the debug
and release configurations.

I tried "cleaning" the 2005 solution and then rebuilding it and the
..pdb now has references to the 2005 project path, but it still tries to
run the 2003 code when stepping through the test code in debug mode.
So... I don't think that cleaning my project is the answer (unless I'm
doing something wrong).

I started to recreate the class library and test form but when I tried
to create the form part of the solution, I noticed that the C# Windows
Form template was now missing (like my Master Page template that
disappeared last week). Looking at the Microsoft forum, I saw entries
that said to repair or reinstall Visual Studio. Any chance you (or
anyone else reading this) has overcome this second issue?

Thanks.
 

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