Thomas Owens
Thomas Owens

Reputation: 116197

I don't get the concept of Visual Studio Projects and Solutions

In Eclipse, I have a workspace that contains all of my projects. Each project builds and compiles separately. A project does not interact with another project.

How does this relate to Visual Studio and Projects/Solutions there?

Upvotes: 9

Views: 2670

Answers (8)

Jeremy Bade
Jeremy Bade

Reputation: 511

I found that not always seeing the solution in the Solution Explorer to be irritating. There is a setting in Options->Projects and Solutions->General called "Always Show Solution" which was handy.

Upvotes: 0

Pete
Pete

Reputation: 1810

There are way too many kinds of web projects in Visual Studio 2008. There are Web Site Projects vs. Web Application Projects and they limit you in different ways. It's a good example of Microsoft providing too many choices instead of focusing on one strong solution. Even within the Web site Project option, there are at least 3 different ways to compile your application.

Upvotes: 0

Tom Kidd
Tom Kidd

Reputation: 12918

The thing that may be throwing you off is the following:

In VS2003, everything had a Project file and a Solution file. If you had a Solution with one Project, you could open the Solution and see the one Project. If you opened the Project, it would try and create a new Solution file to contain the Project. But web projects and Winform projects all had Projects and Solutions.

In VS2005 this changed a bit - by default now, Web projects no longer had Project files. They had received feedback from some web developers that didn't like Project files - their take was that if a file is in the directory, it's part of the app. After VS2005 shipped, they got more feedback from developers who did like the Project file notion, so they patched it back in. This is "Web Site" versus "Web Application" in VS2005 (and I can't remember which is which now).

In addition, in VS2005, if you have a Solution open with only one Project, you won't see in the Solution Explorer that there's even a Solution at all, you'll only see the Project (as if it was not in a Solution). Only after adding the second Project will you see that there's a Solution containing them both.

So basically you were on the right track - Solutions and Projects work the same in Visual Studio as they did in Eclipse, it's just some quirks that make things confusing.

Upvotes: 1

Shawn
Shawn

Reputation: 19823

A Solution has 0 or many Projects...

Upvotes: 0

aib
aib

Reputation: 47031

@Thomas Owens:

Yes, some (most?) people using Eclipse have more than one workspace. It's what surprised me the most when I first started using Eclipse, so I'm replying here to make this comment more visible.

Upvotes: 1

Rob Allen
Rob Allen

Reputation: 17749

Another way to look at it is, a solution is a container for projects. For most of my work , I create each tier as a project within a solution so my tree looks like:

  • My Web App or Win App
    • Presentation Layer
      • files...
    • Business Layer
      • files...
    • Data Access
      • files

Your mileage may vary

Upvotes: 2

Howler
Howler

Reputation: 2262

A VS project is it's own entity. It will build and compile by itself. A Solution is just a way to contain multiple projects. The projects don't necessarily need the other projects to compile (though, they can depend on the other projects).

This just lets you conceptually group projects together into one Big Project. For instance, you can have a separate testing project. It depends on the code from the actual project, and should be kept together with the actual project, but it does not need to be in the same exe/dll.

Upvotes: 23

jodonnell
jodonnell

Reputation: 50487

Each VS project builds a single EXE or DLL. The solution is just a collection of related projects.

So VS project:Eclipse project::VS solution:Eclipse workspace.

Upvotes: 12

Related Questions