japreiss
japreiss

Reputation: 11251

Is it bad to have the same Visual Studio project in two solutions?

I am writing a networking library using Google Protocol Buffers. I have a Visual Studio project that performs a custom build step to run the Protobuf compiler, and another project that builds the output classes.

I would like to put the client library and server library in separate solutions. But both depend on the same Protocol Buffers classes. Is it OK if they both contain the Protobuf-related projects?

Edit to clarify: I know it's possible to do this, but I am curious if it's considered good practice or not.

Upvotes: 0

Views: 96

Answers (2)

Dmitry Pavlov
Dmitry Pavlov

Reputation: 28290

That is OK.

I ususally have several solutions (when I have 20+ projects) with the same set of projects. E.g. I have main solution with all projects I need. And development solution where I also include unit tests projects or similar needed for development perposes only.

There are some links that point to best practices in organizing projects and solutions:

Hope that helps to figure out what is the best practice could be applied to your case.

Upvotes: 1

PaulG
PaulG

Reputation: 7102

Well, I don't think it's a bad idea, but you might want to consider compiling your protocol buffers project into a .dll file and have your client and server side projects refence that instead. Just cleaner in my opinion.

When you make changes to the .dll you can right click the reference to it in your server and client projects and click Update Reference. Simple as that!

Upvotes: 1

Related Questions