Click to See Complete Forum and Search --> : Migration from 2002 to 2003 causing project to always relink


Alturis2
September 16th, 2005, 11:22 AM
Has anyone else experienced a problem where every time you go to run your project from the debugger it thinks that a file it out of date and it relinks before running?

Wouldnt be quite as annoying if it didnt ask you "Would you like to build them?" every time.

I have checked to ensure that no source files have dates older than the linked exe so I am completely baffled as to why it always thinks the project is out of date.

Anyone?

Siddhartha
September 17th, 2005, 09:44 AM
I have checked to ensure that no source files have dates older than the linked exe so I am completely baffled as to why it always thinks the project is out of date.I presume you actually mean the opposite - source files (all of them) should have a timestamp older than the generated files (exe, et al).

Secondly, check if "Incremental Linking" is not disabled.

You need to look up the flag in - Project Properties --> Linker --> Enable Incremental Linking --> "Yes" Though, if it relinks each time even between consecutive debugging cycles without you altering any part of the code, or any external application doing the same - the behaviour is abnormal.

Note that if a Project changes, the other projects dependent on it may need a rebuild / re-link.

Andreas Masur
September 17th, 2005, 10:39 AM
Check your date and time of the PC. This usually happens if the source files ahead of the actual time... ;)

Alturis2
September 18th, 2005, 09:17 AM
Yeah. Did that. Its nothing to do with file dates. Going to overhaul the project settings.

nukomod
October 10th, 2005, 10:53 AM
I have the same problem, except the project has always been under 2003. I've checked the dates on the files and there are no problems. If you've found the solution to your problem could you either post it here or email it to me?

Thanks,

nukomod@meatcity.co.uk

franji1
November 8th, 2005, 10:55 AM
I am having the same problem with my current project that I did migrate from .NET 2002 to .NET 2003.

It always wants to do a Link. Is there anyway to dump the dependency make lookup to see WHY it wants to link?

If it truly is just a migration bug, I think I am just going to reconstruct my project as a new .NET 2003 project.

However, if anyone finds the REAL problem (and possibly a REAL solution), please let us know. Thanks!!

Alturis2
November 8th, 2005, 11:08 AM
I worked with someone from MS on this and it turns out it is a bug in 2003 that will be fixed with the next service pack (thanks to us for pointing it out to them).

In the mean time the solution for us was to make sure that there were no double \\s anywhere within the final command line to the linker or compiler.

So if you are using something like.

..\somefolder\$ProjectDirectory

and the value of $ProjectDirectory is \someotherfolder... the end result command line is

SOMEVALUE="..\somefolder\\someotherfolder"

The compiler and linker exe can deal with this just fine, but the IDE doesnt deal with it properly and is unable to local include libs or whatever dependancy is in your case.

So just look for \\ in your command line summary in build options. If you find one, clean up the offending source.

franji1
November 8th, 2005, 11:20 AM
Hmmm. Thanks for the reply. However, I cannot find any double backslashes (or forward slashes).

Here's the text from my project's Property Pages, Linker, Command Line for my debug build:

/OUT:"Debug/ERMwb.exe" /INCREMENTAL:NO /NOLOGO /DEBUG /PDB:".\Debug/ERMwb.pdb" /SUBSYSTEM:WINDOWS /MACHINE:X86 \code5\utils\debug\utils50.lib hei32_3.lib NetEdLib.lib winmm.lib

likewise, I searched my .vcproj file for double backslashes and found nothing.

double Hmmmmmmm.

Alturis2
November 8th, 2005, 11:23 AM
Sorry then. ;(

Dont know what to tell you. If you have an MSDN license you should be able to get someone from MS to work with you on it. If its a bug in their product the service will be free (wont cost you a support ticket or whatever).

I was equally frustrated with the lack of information about the problem. There are several KB articles with suggestions for resolving the issue too. But none of them were our issue obviously.

franji1
November 8th, 2005, 11:27 AM
Thanks for the help - I'll check out the KB articles.