您的位置:首页 > 其它

Understanding Solution, Project and...

2009-10-24 17:40 323 查看

Solution

(*) .sln and .suo

.sln
The solution definition file is responsible for actually describing any project relationships in the solution and for storing the various solution-level attributes that can be set.
A .sln file is a text file. We can view and edit it with notepad.

.suo
Solution user options file persists any customizations or changes that you, as a Visual Studio user, might have made to the way the solution is displayed within the IDE (such as whether the solution is expanded or which documents from the solution are open in the IDE). In addition, certain source control settings and other IDE configuration data are stored here.
A .suo file is a hidden file, and in binary format, not human-readable. Usually we only care about .sln file, because it can help us resolve some compiling problem.
There is a learning case: we have a solution which contains an empty project "WinFormTest" and a solution folder "NewFolder1" which contains a text file "TextFile1.txt". In .sln file, we can see content as below:

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormTest", "WinFormTest\WinFormTest.csproj", "{AEF13270-0C1C-417D-935F-FDE97B5062E6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NewFolder1", "NewFolder1", "{4C259E34-F5E2-4F53-AD3E-332C14E685CD}"
ProjectSection(SolutionItems) = preProject
TextFile1.txt = TextFile1.txt
EndProjectSection
EndProject
The solution folders are represented in the .sln file in much the same way as projects. In fact, the only difference is that they do not have a relative file path associated with them.

(*) solution folder

Creating a solution folder does not cause a physical file folder to be created on disk; these folders exist solely to provide another grouping level within the solution. Solution folders can be nested and are especially useful in large solutions that contain many different projects and miscellaneous files. For example, you may want to group all of your web service projects under a single solution folder called Services while grouping the Windows forms elements of your solution under a UI folder. On disk, files added to a virtual folder are physically stored within the root of the solution directory structure.

(*) solution properties

Right click solution, select "Properties".
It's not very useful because most settings are automatically set or can be set in other places.
To view project denpendency may be the only valuable function of solution properties. We can know project denpendency a little faster.

Project

(*) web application project VS a website project

One key difference is the way that these two different project types are built. Web application projects use the same build model as the other .NET project types; that is, all the code in the project is compiled into a single assembly. Website projects, on the other hand, support a dynamic build model in which the code for a particular page is generated at runtime the first time a user hits the page. In this model, each page has its own assembly.

(*) subfolder of project

Projects, like solutions, can also have subfolders within them that you can employ to better manage and group project items. Unlike solutions, the folders you create within a project are physical; they are created on disk within your project directory structure.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: