views:

19

answers:

1

I'm not really sure how to phrase my issue, so I hope this isn't a repeat.

The problem I'm seeing is with Visual Studio 2008. When I directly reference a project within my solution, I notice that the dependent reference occassionally gets out of synch, and my top-level project ends up holding on to an old build of the DLL (most obvious in the fact that my break-points are no longer being hit). I would expect behavior like this if my reference was DLL-based, but I thought reference the project directly was supposed to avoid these synchronization issues since the projects are built in tandem as part of the solution.

If I manually change the version number of the dependent project, that seems to force a reference update and correct things, or of I rebuiild the dependent project, then "clean", and rebuild the entry point project, the references seem to synch up, so I do have a workaround. In the past, though, I never really noticed this problem; a full rebuild of the solution usually kept everything synchronized in one easy step.

It took me a little while (and a good deal of frustration) to determine the nature of the problem, and since it's been sporadic, it's taken me even longer to realize that it's more than just a fluke. all that to say, I can't quite pin point what's changed between the time things worked well, and now.

I have done the following fairly recently, so I was hoping to pick y'alls brains to see if there were any known issues (and/or a simple fix) related to any of these things.

  • Upgraded (debatable adjective? :) ) my OS from XP to Windows 7
  • Upgraded from 32-bit to 64-bit processor (my OS change reflected this as well...32bit XP -> 64bit Win7)
  • Installed Visial Studio 2010 Express alongside my 2008 version.

I'm running Visual Studio 2008 w/ SP1 (v 9.0.30729.1)

A: 

Are you adding project references or are you browsing to a dll under the /bin directory to reference it? If you browse you'll have these issues; that's why you add project references (Project tab of the Add Reference dialog).

Second possibility is that your build is configured so that the referenced project isn't being built.

Open the Configuration Manager dialog (right click on the solution, select Configuration Manager...) and make sure for the currently selected platform everything you need is building (the checkbox in the Build column is checked).

Will
I'm selecting the dependency as a "Project", not browsing out to the DLL. In the past, I've never had a problem with that, but recently (sporadically over the past 3-4 months?) I've noticed some quirky issues with synchronization. I don't know what's changed, but you bring up a good point with the platform details.
Steven
whoops...I tried to add a hard line break w/ Enter, but it submitted my incomplete comment instead. W/R/T the platform options, I did notice with my transition to 64-bit that Visual Studio does not seem to support code editting during processing in the 64-bit environment (32-bit allows for this). Also, I've noticed some quirks when referencing 64-bit builds (in my case, that's the result of the "Any Processor" setting rather than a deliberate choice to use x64), so I've gotten in the habit of forcing every project to a 32-bit platform....could this be causing issues?
Steven
I should have read your post more carefully. You answered my question. In the Configuration Manager, two of my dependent projects was not checked to be built. I had double-checked the "Project Dependencies", and "Build Order" items, but missed this one...I guess I need to read up on some things, because it seems like the Configuration Management and Build Order would show, essentially, the same things, but in my case, they seem contradictory...hmm...Anyway, thank you for the quick and thourough response!
Steven
@Steven cheers.
Will