[Graduate business software development path] solution Resource Manager

Source: Internet
Author: User

Solution Resource Manager

The solution Resource Manager is located in the upper-right corner of the Vs. Net integrated development environment. The user interface is as follows.

Solution Explorer contains a toolbar and a solution Resource Tree list. [Yuan Yongfu copyright] Solution Resource Tree list The solution Resource Tree list lists all member projects contained in the C # project. The tree lists the following common member project types. Solution The tree list contains only one solution root node. All member projects under the solution are listed under the root node. The solution is generally a variety of Engineering Project nodes. It can also be other files. For example, in the tree list, the root node is "", which contains a C # project node. Right-click the solution node. A shortcut menu is displayed.

Common menu items in this shortcut menu include

 

Generate a solution For allProgramCompile the project and output the compilation result. This is incremental compilation. Before compiling a program project, you can determine whether the project and its content have changed. If so, you can compile the project. Otherwise, you can use the final compilation result. This saves the execution time of the generated solution. For example, for a C # projectSource codeFile, the resource file has not been modified, the C # project will not compile but use the last compilation result when the solution is generated.
Regenerate Solution It also compiles all Program projects under the solution and outputs the compilation results. However, incremental compilation is not performed.
Add This menu item has a submenu item.
Add → create a project The "Add new project" dialog box is displayed. if you add a project to your operations, add the new project to the solution. The newly added program project will also be loaded when the solution is opened next time.
Add → existing project The "add existing project" file selection dialog box is displayed. If you select a. program project files supported by. net, such as C # Or VB.. Net project file,.. Net to load the project and add it to the solution. The program project will also be loaded when the solution is opened next time.
Add → new website The "Add new website" dialog box is displayed. if you add a website program project to your operations, add the new project to this solution.
Add → existing website The "add existing website" dialog box is displayed. If a user opens a program project of the website type, vs. net adds the program project to the solution.
Rename Modify the solution name.
Attribute The Solution Properties window is displayed in the main work area of vs. net.

 

Program Engineering The program engineering nodes in the solution are listed under the solution node. A solution can contain multiple and multiple Program projects. For example, a solution can contain several C # projects and several VB.. Net project or several VC ++. net project, installation project, and so on. [Yuan Yongfu copyright ownership] in, the node "" is a program engineering node. Click the program project node. A shortcut menu is displayed.

Common menu items in this shortcut menu include

 

Generate Compile the program project and output the compilation result. Incremental compilation will be performed to determine if the source after the last generationCodeOr if the resource file has not been modified, the previous compilation result will not be re-generated and will be used directly.
Regenerate Compile the program project and output the compilation result. No incremental compilation judgment is performed.
Add This menu item has several sub-menus.
Add → add item The "Add new project" dialog box is displayed to add new files to this project.
Add → existing items The "add existing items" dialog box is displayed. You can add multiple existing files to a program project.
Add → create a folder Create a new folder in the program project.
Add → Windows Forms The "Add new project" dialog box is displayed, and the project type is set to "Windows form" automatically ". It is used to quickly add a new windows form type to a program project.
Add → User Control The "Add new project" dialog box is displayed, and the project type is set to "User Control" automatically ". It is used to quickly add new user control types to the program project.
Add reference The "add reference" dialog box is displayed. Add an Assembly reference for the program project so that the software can call the software functions already implemented in other programs.
Add web reference The "add web reference" dialog box is displayed. Add a web reference for the program project. Yes, the software can call WebService.
Set as startup project In. net developer click. net menu "debug-start debugging" or press the F5 key to start the program in debug mode, because the solution can contain multiple Program projects,.. Net does not support running all Program projects at the same time. Therefore, you must specify one project as the first project to be started from multiple Program projects. Use this menu item to specify the current program project as the startup project. The startup project must be of the winform type, command line type, or website type, and cannot be of the class library type.
Remove This project is deleted in the solution, but no project files are deleted, but the solution does not include this project.
Rename Modify the name of a program project. If the project name and file name are the same, modifying the project name also changes the file name. Note: modifying the project name does not change the Assembly name and default namespace of the project. For example, in the C # project "the first Windows application", the project name is "the first Windows application. csproj; if the project name is changed to "second windows application", the project file name is changed to "second windows application. csproj ". However, this project compilation output result is also the first Windows application program. EXE ".

 

Reference The external Assembly referenced by this C # project is listed under the "Reference" node in the tree list. External assembly is an independent program module developed by others. developers can call the functions of these existing program modules in their own programs to realize software reuse. [Yuan Yongfu copyright] In this example, the C # project "the first Windows application" references "system" and "system. data, system. deployment "," system. drawing "," system. windows. forms and system. XML. Right-click the reference node and the shortcut menu shown in is displayed.

In this shortcut menu, the "add reference" menu function is equivalent to "add reference" in the shortcut menu of the program project ", the "add web reference" menu function is equivalent to "add web reference" in the shortcut menu of the program project ". Program file Most of the program project nodes are program file nodes. Including source code files, program resource files, and other document files. For some program modules, such as forms, user controls, and ASP. NET pages, multiple program files are required. These associated files are displayed as child nodes of the main file. As shown in, a form generally contains three files. For example, the form "frm left alignment" contains three files: "frm left alignment. cs", "frm left alignment. Designer. cs", and "frm left alignment. resx ". The first file is the form source code main file, "designer. CS is the code file automatically generated by the Form Designer, and the "resx" file is a form resource file used to save resource data such as various slices in the form. As shown in, right-click the file node and a shortcut menu is displayed.

Common menu items in this shortcut menu include

 

Open Open the file in the default mode corresponding to this file type. Double-clicking a file in the tree list is equivalent to executing the "open" operation. For example, for a form code file, open the form designer in the main work area of vs. net. For pure source code files, the content of the source file is displayed in the main work area. For Word documents, the MS Word program is called to open the file.
Open Mode The "open mode" dialog box shown in is displayed. Select a method to open the file.

View code Directly view the source code of the file without calling a visual designer. For example, for a form code file, the Form Designer is called by default to open it, and click "view code" to display the C # source code of the form code file.
View designer Call the visual designer of the file type of the current file to view and edit the file content. For example, for form1.cs in this example, call the Form Designer to open the file.
Exclude from project Remove the current file from the program project so that the program project no longer contains the file. But the file will not be deleted from the disk. In the future, you can use the "add existing items" operation to re-include files in Program projects.
Cut Cut the file.
Copy Copy a file.
Delete Delete an object. Note: This operation permanently deletes files from the disk and cannot use the recycle bin function of windows to restore files.
Rename Modify the file name.
Attribute The property settings of the file are displayed in the property list.

 

For different file types, the content of the shortcut menu may be changed, even if the menu content of files with the same extension is different. For example, for form1.cs,. net detects that the file is the main source code file of a form. Therefore, its shortcut menu includes the "view designer" project, in addition, clicking the "open" menu will call the winform Form Designer to open the source code file. CS file,. net detects that the file is a pure C # source code file, and its shortcut menu does not have "view designer ", click "open" to display the content of the C # source code file in text. Folder When there are many program files, you can use folders to organize and manage program files in a tree structure. For example, program code of the same functional module can be placed in a folder. For C # projects, folders also affect the default namespace of the source code. Add the program source code file in the sub-folder of the project, and the namespace in the source code is "project default namespace. subfolders name ". The name of the resource file in the subfolders In the compiled assembly is also "Default project namespace. subfolders name. File Name ". [Yuan Yongfu copyright] for the C # project "first Windows application" in this example, the default namespace is "first Windows application ". On the C # project node in the solution Resource Tree list, right-click the shortcut menu and click "Add-new folder, A new "newfolder1" folder is created under the project node. Right-click the "myfolder" folder and the shortcut menu shown in is displayed.

Common menu items in this shortcut menu include

 

Add This project has multiple sub-menu items. These sub-menu items are used to add new files or subfolders under this directory.
Exclude from project Exclude this folder and all subfolders and files from the project, but do not delete the folder and its content from the disk.
Rename Modify the name of the folder.

 

Click "RENAME" to change the folder name to "myfolder ". This completes the operation of adding a folder with the specified name. Add a C # class source code file named "myclass" under the myfolder folder. Open the file and you will see the following code text: Using System;
Using System. Collections. Generic;
Using System. text;

NamespaceThe first Windows application. myfolder
{
ClassMyclass
{
}
}

 
 
As you can see, by default, this type of namespace is "the first Windows application. myfolder ". Note: After you modify the name of the folder, The namespace of the source code of [Yuan Yongfu copyright] in the folder will not be automatically updated, however, the namespace in the newly added source code contains the name of the new folder. Developers can create subfolders under folders to form a multi-level directory structure. In this case, the default namespace of the C # code file added under the Multi-tier folder is "project default namespace. Folder name. subfolders name", and so on. In theory, there is no limit on this hierarchical folder relationship, but in my practice, at most three layers are used.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.