• Advertisement
Sign in to follow this  

Visual Studio .. multiple projects in solution

This topic is 2089 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,

I have setup a solution in Visual Studio 2010 Pro, which consists of 6 projects ... The solution looks like this :

MyGameSln
(1) ClassInterfaces library project
(2) GameDataModel library project
(3) SlimDXFramework library project
(4) UserInterface library project
(5) Utilities library project
(6) Game project (startup project)

My old way of working on my GUI or SlimDX frameworks was to just make copies of the folders and drop them into the project Im working on, but I would end up with different versions of each framework for each project, and it was becoming hard to consolidate the developments in each. So the way I'm trying now, as detailed above, should allow me to continuously improve the SlimDX and UserInterface libraries over each new project or project version, since there is now only one project for each library and that project just gets added to each new solution.

My problem is that when i modify the UserInterface code (for example), I can't just press F5 to compile and run anymore, because the UserInterface library project's dll is out of sync with the source code. Sometimes I rebuild the solution, sometimes I rebuild each library then rebuild the main project and then press F5. All this is becoming tedious to do, so could anyone please instruct me on how to set up Visual Studio to rebuild all dependencies if their source code has been modified. Remembering that Im still working on the libraries side by side with the game project.

Thank you for any help or advice.

Share this post


Link to post
Share on other sites
Advertisement
Doesn't VS 2010 have project dependencies anymore?

At least in VS 2008 you can right click on the solution (root item) in solution explorer and set the project dependencies. Now if you compile a project all its dependencies are compiled first (if they changed).

Share this post


Link to post
Share on other sites

Yes, ive looked at that, and it seems to automatically detect dependencies, but it just doesn't work.


What is it that doesn't work ? Right-click on the solution in the file view and chose properties in the menu, this will display solution's properties page. There is a combobox from which you can chose a project. Once you have done that, you just have to check the various projects you want to set as dependencies for the one you have chosen in the combo. That way, you can set the dependencies for each project in your solution. Edited by Laval B

Share this post


Link to post
Share on other sites
You may need to link your libraries and do some fancy stuff with your include headers to get your dependencies working.

Share this post


Link to post
Share on other sites

Laval B, you have solved it for me. I was right-clicking over project and selecting 'Dependencies' and 'Build Order', which was misleading me. But the solution properties section you pointed me to allowed me to tick 'Build' for all projects in the configuration node.


Yeah, i've been there too ;) Don't forget, like incertia above said that you need to setup your libraries and includes paths just like you would if you weren't compiling them with your project.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement