VS2010, one solution, multiple independent C++ and C# projects, set up 1 startup project, any relation or influence between projects?

Hi there;

In VS2010, I got one solution, having multiple independent projects, and I set up 1 startup project, are there any relation or influence between projects if there is no reference between each other?

if there is a relation, what is the build order? I mean how VS2010 finds out the correct build order if the coder is not assigning it manually?

Kind regards.
LVL 12
jazzIIIloveAsked:
Who is Participating?
 
käµfm³d 👽Connect With a Mentor Commented:
Yes, if by "dll as a reference" you mean one of the other projects in the solution. That is a dependence that VS should automatically detect (I've never known it not to automatically do so). Though I can't think of a reason why you would need to, if you didn't have a dependence (reference) between projects in your solution and you wanted to enforce a particular build order, then you could use the method I outlined above.

If by "dll as a reference" you mean some other DLL that you've already compiled (outside of the solution), then there would not be a dependence in your solution. Also, if you added your reference to the DLL of one of your projects by "browsing" to the DLL rather than adding a "project" reference, then there would not be a dependence--at least not in the way we are discussing here with VS and build order.
0
 
käµfm³d 👽Commented:
are there any relation or influence between projects if there is no reference between each other?
There shouldn't be.

how VS2010 finds out the correct build order if the coder is not assigning it manually?
I believe VS would look at the order of the projects in the solution file (.sln). If there's no interdependence, though, why would you care?
0
 
käµfm³d 👽Commented:
In playing around in VS, if you right-click the solution in Solution Explorer, then select "Project Build Order...", you can change the build order by making on project dependent on the other. This doesn't mean you have references between the projects; rather it means you want to ensure one builds before the other.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
jazzIIIloveAuthor Commented:
>>I believe VS would look at the order of the projects in the solution file (.sln). If there's no >>interdependence, though, why would you care?

Supposing there is a dependence, of course.

>>rather it means you want to ensure one builds before the other.

How can I find out the right build order? I mean what is the idea? should the order reflect my order of implementation?

What I mean is that, suppose there is a dependence between projects:

e.g. I wrote first project and used that project's one class, in the second project; so is the build order; first.csproj then the second.csproj?

Kind regards.
0
 
käµfm³d 👽Commented:
Maybe we should clarify what you mean by "dependence". I took this to mean one project references another. Are you referring to something else?
0
 
jazzIIIloveAuthor Commented:
Using a dll as a reference? Is it true for the definition of the dependence?

Regards.
0
 
jazzIIIloveAuthor Commented:
Ok, thanks for the clarification. I am just populate my thinking which is in multiple project case and if they are dependent by dll, what can be the build order? (it's a little out of the question, i know but i am also populating the question)
0
 
jazzIIIloveAuthor Commented:
I mean how VS determines the order? Order regarding the call for the dll?

Regards.
0
 
jazzIIIloveAuthor Commented:
ok, new issue, when there is a compile problem in a project which is not related with the other project, why is that other project not able to run until fixing the code of the program having the compile time error?

Kind regards.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.