0

I am maintaining a C# solution consisting for multi-project. It's usually no problem altering any project except on project z, which gets referenced in a few other project in the solution and also in project a and b.

Project a uses the main GUI whereas project b and z are referenced in project a. When project z is changed and built, I get mismatch of version.

I currently use references and post build script to copy the output to the right project. I did this because it usually saves a lot of compile and build time.

I'm getting tired of manually correcting the problem with manual copy of project z output to b and a.

I guess it's a tossup to allow debugging or not. I normally don't need debugging on project z and hence I use reference on the z's any CPU release build in many places.

Any suggestion to improve on this?

gg89
  • 372
  • 3
  • 11

1 Answers1

2

The problem is that you are referencing a specific version of the dll, and when you update the dll with a new version, the version's don't match.

The best way to solve this problem is to reference projects b and z directly.

Remove the existing references from project a, and add new references.

When you add the new reference, there is an option to add a project reference, choose that option.

The build mechanism will automatically copy the appropriate dll's out for you.

Chuck Buford
  • 321
  • 1
  • 9
  • so I can remove the post build script for project b and z? and use project references for b and z in project as well as project ref for z in project B? btw project b does build an standlone exe with it's own gui – gg89 Sep 16 '14 at 18:10
  • Yes, you can do that. Visual Studio can manage all of that for you. – Chuck Buford Sep 16 '14 at 18:40