Jump to content

  • Log In with Google      Sign In   
  • Create Account

Visual Studio .. multiple projects in solution


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Gavin Williams   Members   -  Reputation: 776

Like
0Likes
Like

Posted 01 June 2012 - 07:40 PM

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.

Sponsor:

#2 Endurion   Crossbones+   -  Reputation: 3685

Like
0Likes
Like

Posted 01 June 2012 - 10:38 PM

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).
Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

#3 Gavin Williams   Members   -  Reputation: 776

Like
0Likes
Like

Posted 01 June 2012 - 11:41 PM

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

#4 Laval B   Crossbones+   -  Reputation: 5330

Like
3Likes
Like

Posted 03 June 2012 - 11:32 AM

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, 03 June 2012 - 11:33 AM.

We think in generalities, but we live in details.
 
Alfred North Whitehead

#5 incertia   Crossbones+   -  Reputation: 779

Like
0Likes
Like

Posted 03 June 2012 - 12:46 PM

You may need to link your libraries and do some fancy stuff with your include headers to get your dependencies working.
what

#6 Gavin Williams   Members   -  Reputation: 776

Like
1Likes
Like

Posted 04 June 2012 - 05:06 AM

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.

#7 Laval B   Crossbones+   -  Reputation: 5330

Like
2Likes
Like

Posted 04 June 2012 - 09:57 AM

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.
We think in generalities, but we live in details.
 
Alfred North Whitehead




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS