I received source code of a web application for Visual Studio which its solution contains 15 different projects and I’m supposed to create something like that.
The main project is a MVC3 web application, and the rest are non web applications just for handling data and other resources.
I don’t know the type of those projects while I try to add new projects to my new solution. Could I just add an empty project for example a asp.net web application empty project or anything else C# application empty project even a windows one and still make the right solution with adding right references , configure and other files? does the type of project really matter?
The type of project matters to Visual Studio because it controls the compile switches. There are different switches to create a .dll (Class Library project) and so forth. Visual Studio also uses the project type to determine how to run a particular project. (In the Cassini web server for websites and Web Projects, or just as an executable for Console and WinForms apps, etc.)
If you have the .csproj files, you can look in the file to determine the project type.
For example, a Class Library will have
A WinForms, Console, or Windows Service app has
A Website will have no .csproj file, but you’ll be able to identify that based on the existence of .aspx, .asmx, and other files.
If you DON’T have the .csproj files you’ll be left to your best guess. Generally, if it looks like a bunch of classes with no Main() function to be found, and those classes are referenced in another library, it’s most likely a Class Library project.
If you see a Main() routine, it could be any of the varieties of Windows Executables, so you’ll need to look for clues like the existence of Console.WriteLine() calls (usually associated with Console apps) or Windows UI components like TextBoxes, etc, and references to the System.Windows.Forms Namespace. References to System.ServiceModel generally indicate a Windows Service, etc.