Overview of the following file formats in the bin directory during the. NET development process

Source: Internet
Author: User
Tags xml parser
In. NET development, we often see these types of files under the bin directory:

. pdb,. xsd,. Vshost.exe,. exe,. exe.config,. Vshost.exe.config

When the project is released, it is often unclear what is needed and what is not needed. So what exactly are the files in these formats for?

Pdb

The. pdb file, which is the symbol file (program database) that is generated for debugging with VS, holds the information for debugging. In the case of VS engineering properties, C + +, debug Information format, set/zi, then vs will create the PDB file when building the project.

Here are two things to differentiate:

1, when building a static library, you can set the PDB file name that is generated in the project properties –> c/c++–> output file –> program database name, if not specified, The default is vcx0.pdb, where x is the VS version number, for example, with VS2005, a vc80.pdb is generated. This raises the question that the. pdb file that is generated by default when compiling a static library has the same name, and the project referencing this static library can finally find the correct. pdb file? The answer is yes, because vs will embed the path to the. pdb file in the generated file.

For example, under Project/toola, build a static library ToolA.lib, corresponding to generate a vc80.pdb, also under Project/toolb, built a static library ToolB.lib, corresponding to generate a vc80.pdb. Then the final engineering Work.exe linked the two static libraries at the same time. When the work.pdb is generated, it will find its corresponding symbol file path project/toola/vc80.pdb in ToolA.lib, and ToolB.lib The corresponding symbol file path project/toolb/vc80.pdb, combined to generate the work.pdb of the final project.

2, build an executable file or a dynamic library, in which case the compiler generates a. pdb file, the linker generates a. pdb file, and the compiler-generated PDB file can be set in the project properties –> c/c++–> output file –> program database name. The linker-generated. pdb file can generate debug information (set YES) in the project Properties –> linker –> Debug –>, generating the program database name settings.

What's the difference between these two PDB files? The compiler-generated PDB file, which is also named by Vcx0, is the compiler that stores the symbolic information for each. obj file in the compilation process, but does not include the function definition. The linker-generated. pdb file, named by the project name by default, is a symbol file with complete information that is further processed by the linker when linking the project, based on the compiler-generated vcx0.pdb. Just as the linker generates an EXE or DLL based on each. obj file, the compiler-generated. pdb file is the intermediate product of the compile-link process, and finally the linker-generated projectname.pdb is used to debug the program.

It says the PDB file generation rule. In use, the adjustment period will take the file corresponding to the PDB file path, and then go to that path (absolute path) under the search, if this EXE or DLL is self-made, that no matter where it is placed, the PDB file as long as not moving, the debugger can find it. If the debugger is not found under that path, it will be found in the same sibling directory as the EXE or DLL. For example, this project is compiled by others, along with the symbol file, we just put the symbol file and EXE or DLL in the sibling directory, the debugger can find it. Of course, you can also specify the symbol file path yourself in the debugger

Xsd

XSD refers to the XML Structure definition (XML Schemas definition)

XML Schema is a substitute for DTDs. The XML schema language is also XSD.

The XML Schema describes the structure of the XML document. An XML document can be validated with a specified XML schema to check whether the XML document meets its requirements. The XML schema allows the document designer to specify the structure and content allowed by an XML document, and to check whether an XML document is valid. The XML schema itself is an XML document that conforms to the XML syntax structure. It can be parsed with a common XML parser.

An XML schema defines the elements that appear in the document, the attributes that appear in the document, the child elements, the number of child elements, the order of the child elements, whether the element is empty, the data type of the element and attribute, the default and fixed values of the element or attribute.

XSD is the reason for DTD substitution, one is that the future conditions can be expanded, two is richer and more useful than DTDs, three is written in XML, four is support data type, and five is support namespace.

The suffix of the XSD file is. xsd.

The advantages of XML schema:

1) XML Schema XML-based, no specific syntax

2) XML can parse and process like other XML files

3) XML schema supports a range of data types (int, float, Boolean, date, etc.)

4) XML schema provides an extensible data model.

5) XML schema supports integrated namespaces

6) XML schema supports attribute groups.

. Vshost.exe and. exe

The. Vshost.exe as the name implies, is the Visual Studio host application, vs run debugging is actually open when the file, this program can let vs Trace debugging information. The host process is a feature in Visual Studio 2005/2008/2010/201x that improves debugging performance, supports partial-trust debugging, and supports design-time expression evaluation.

The filename of the host process file contains Vshost and is located in the output folder of the project. EXE can be opened directly, and VS will not track the operation of any of the files. As long as the referenced assembly is complete, it can be run directly.

Differences between the. exe.config and. Vshost.exe.config

The. exe.config is a non-debug configuration file.

Vshost.exe.config is a temporary file that is used when debugging is generated during debug.

The contents of the Vshost.exe.config file in the folder and. Exe.config are identical, primarily for hosting process debugging, and should not be run or deployed directly through the application.

The above is the whole content of this article, I hope that the content of this article on everyone's study or work can bring some help,

  • 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.