views:

75

answers:

2

Hello StackOverflow. I have an interesting problem.

I am developing for a .Net2.0 solution. I have finished my development and checked my source in [er, to a local Clearcase stream - don't ask, this just means I'm done dev]. This source is, and must remain .Net2.0 Vs2005 compliant.

Unit testing is somewhat more lax. I would like to take advantage of .Net3.5's lamda expressions and full range of Moq's mocking capabilities. To this end, I have created a separate solution in Vs2008 and attempted to reference the Vs2005 project - however there are problems.

Referencing the source project requires upgrading the project to Vs2008, breaking our build solution [which must remain .Net2.0 Vs2005]. I have also considered creating a parallel project but this has several drawbacks - including synchronization and source control issues.

Ideally, I would like to reference the Vs2005 project from Vs2008 as is.

Ideas? Suggestions? Solutions? Disproof? :)

Thanks!


Ps attempted a search of SO prior to submission, but if you happen to know this is a dupe, redirection would be much appreciated! Cheers!

+2  A: 

Since you can't reference the project you will have to reference the assembly directly. When adding the reference to the test solution, just click on the "Browse" tab and find the .dll that the vs2005 project created.

Matthew
agreed. less than ideal - but it's what i've fallen back to without an alternative. was hoping perhaps someone knew of some way to reference the project without resorting static dlls. will accept if no other alternatives present themselves :)
johnny g
I guess I would ask why the other project has to be vs2005 since vs2008 can target the 2.0 framework.
Matthew
yeah, good question. it's a rather large project, with many [30+] projects, and client does not want to undertake a conversion at this time. it's just unfortunate is all - but it's something i will continue to press them about :)
johnny g
A: 

You could create a separate project for VS2008 in the same folder, and include the same files in it. VS2008 will still allow you to generate v2 assemblies, although you will introduce issues keeping the VS2005 and VS2008 projects in sync.

Rowland Shaw