blah blah blah is here! blah blah » Close

up0down
link

What is the correct way to structure a project in Visual Studio? I currently have a few classes which serve as a back end to an application. I then have two versions of applications, a console app and a WPF app.

Up until now I *know* I have been handling this foolishly. I've basically had a copy of the back end in each of the two applications. This doesn't work very well when changes are made to the back end.

So, now I have changed the back end to be a project of its own... and by default I guess VS creates a solution for it as well. Then I have a solution for each of the two apps. In these two solutions I have added the existing project of the back end. Finally, in order to get it to compile, I had to add references in each of these solutions to the back end project.

Silly question... but does this sound correct?

last answered one year ago

1 answers

link

The short answer is 'yes'.

A Visual Studio solution is just a bunch of projects so, if several solutions need to use a particular project, then it's best to develop that project separately, add it to the solutions which need it and fix up the references accordingly.

That way, if you need to change the project, the changes are automatically propogated to the solutions which use it.

Feedback