tailieunhanh - Visual studio 2010 part 14

Như bạn thấy trong hình 5-5, những thông tin hội từ tài sản của dự án là bao gồm trong tập tin. Điều này thuận tiện cho bạn (hoặc một người dùng cuối) để có thể mở tập tin và đọc các thông tin cần thiết, đặc biệt là phiên bản thông tin, để biết bạn đang làm việc với việc lắp ráp chính xác, để gỡ rối, hoặc chỉ để biết những gì trên hệ thống của bạn . | 122 Microsoft Visual Studio 2010 A Beginner s Guide Figure 5-5 File Properties window As you can see in Figure 5-5 the Assembly Information from the project properties is included with the file. This is convenient for you or an end user to be able to open the file and read pertinent information especially version information to know you re working with the correct assembly for debugging or just to know what is on your system. Referencing Assemblies All projects normally reference external assemblies. For example is a .NET Framework assembly that contains all of the primitive .NET types and is normally included in every project. Each project type has a specific set of assemblies that appear in the References list. The assemblies that appear in this list are either required because of the type of project you are building or are optional and contain libraries that are commonly used for that type of project. You are free to remove assembly references if you like but be aware that removing a reference to an assembly required for that project type is likely to result in your code not being able to compile. Chapter 5 Creating and Building Projects 123 Assembly references are added to a project to tell the compiler where to find the types it is using in an application. When your compiler runs it will know what types you have in your code and looks through the set of referenced assemblies to find that type. Adding an assembly reference doesn t add all of the code from the referenced assembly to your code it just tells the compiler where to look. NOTE There is often confusion around the relationship between assembly references and namespaces. A namespace using statement Imports in VB allows your code to be written without fully qualifying type references for types in an assembly. However the assembly reference is just a way to tell the compiler in which specific external assembly to look to find those types two different purposes. This confusion is exacerbated by