Open Visual Studio. In Solution Explorer, we can see all the file organization structures under the current project or solution. However, there are two forms that you may know, but not many people know how to create it. This is the dependency file and link file.
First look at the dependent files, the most classic is in the Web ApplicationProgramProject,
Mutually dependentCodeFile,
This clearly shows the relationship between the base class and the subclass through the file display method.
You can create common code files in a directory of the same level, open the. csproj or. vbproj file in a text editor, and find the node.
Add the dependentupon subnode to the corresponding class file and specify the dependent class file name. Here we will introduce two plug-ins to help us complete this operation in the right-click menu, vscommand and Nestin.
Let's take a look at the link file,
I created another project, and then created a code file pointing to a database in the figure above to provide services (note the icon ), the advantage of doing so is that I can propose an original class file for compilation, instead of copying a copy. The file here is only a link, and the previous code file is opened after clicking it.
You can create a new project, select Add-existing item, find the file you want to link to, and select "Add as Link" next to the Add button ".
In fact, this is nothing magical, but it is easy to ignore because it is not common, dedicated to this curious audience of friends.