Xem mẫu

B Command-Line Utilities 2 Appendix B: Command-Line Utilities n addition to the compilers for Visual Basic .NET (vbc.exe), C++ (cl.exe), and C# (csc.exe), the Microsoft .NET Framework SDK adds a number of tools designed to make it easier for you to create, deploy, and manage applications and components that target the .NET Framework. This appendix will introduce these tools and will also detail the command-line usages of vbc.exe. Command Utilities In order to be able to run these command-line utilities, you must configure the environment properly. The Visual Studio .NET installation includes a command file (VCVARS32.bat) that configures the command environment properly by setting the path variable to include the Visual Studio .NET directory. The command file is installed in the \bin directory of your installation (the default is c:\Program Files\ Microsoft Visual Studio.NET\vc7\bin). The command file is configured during the installation of Visual Studio to correspond to your computer’s setup. Do not replace a missing or damaged VCVARS32.bat file with a VCVARS32.bat from another machine. Rerun setup to replace the missing file. To run VCVARS32.bat, you can execute it from the path or you can use the shortcut. Select Start | Programs | Microsoft Visual Studio .NET | Visual Studio .NET Tools | Visual Studio .NET Command Prompt. We recommend that you create a shortcut to the .NET command prompt on your desktop and in the Windows taskbar. The .NET Framework SDK tools are grouped according to use: Debugging tools (see Table B-1) Configuration and deployment tools (see Table B-2) Security tools (see Table B-3) General tools (see Table B-4) Debugging Tools TABLE B-1 The .NET Framework SDK Debugging Tools Tool Microsoft CLR Debugger (DbgCLR.exe) Runtime Debugger (Cordbg.exe) Description Provides debugging services with a graphical interface to help application developers find and fix bugs in programs that target the runtime. Provides command-line debugging services using the Common Language Runtime Debug API. It is used to find and fix bugs in programs that target the runtime. Command Utilities 3 Configuration and Deployment Tools TABLE B-2 Tool The .NET Framework SDK Configuration and Deployment Tools Description Assembly Cache Viewer (Shfusion.dll) Assembly Linker (Al.exe) Assembly Registration tool (Regasm.exe) Assembly Binding Log Viewer (Fuslogvw.exe) Global Assembly Cache tool (Gacutil.exe) Installer tool (Installutil.exe) Isolated Storage tool (Storeadm.exe) Native Image Generator (Ngen.exe) .NET Framework Configuration tool (Mscorcfg.msc) .NET Services Installation tool (Regsvcs.exe) Soapsuds tool (Soapsuds.exe) Type Library Exporter (Tlbexp.exe) Type Library Importer (Tlbimp.exe) Web Services Description Language tool (Wsdl.exe) Lets you to view and manipulate the contents of the Global Assembly Cache using Windows Explorer. Allows you to use either resource files or Microsoft Intermediate Language (MSIL) files to generate a file with an assembly manifest. Registers .NET Framework classes to the Registry, which allows COM clients to create .NET Framework classes transparently. Displays log-file information for failed assembly binding. This information can help you diagnose the reasons the .NET Framework has problems locating an assembly at run time. This tool allows you to view and manipulate the contents of the Global Assembly Cache and download cache. You can use Gacutil.exe in build scripts, makefile files, and batch files. Allows you to install and uninstall server resources by executing the installer components of a specified assembly. Displays and manages all existing stores for the currently logged-on user. Lets you create a native image from a managed assembly and install the image in the native image cache on the local computer. Provides a graphical interface for managing .NET Framework security policy and applications that use remoting services. This tool also allows you to manage and configure assemblies in the Global Assembly Cache. Allows you to add managed classes to Windows 2000 Component Services (COM+) by loading and registering the assembly and generating, registering, and installing the type library into an existing COM+ 1.0 application. Lets you compile client applications that communicate with XML web services. The technique used is called remoting. Generates a type library from a Common Language Runtime assembly. Converts the type definitions found within a COM type library into equivalent definitions in managed metadata format. Generates the code for XML web services and XML web service clients, XML Schema Definition (XSD) schema files, and the .disco discovery documents from WSDL (Web Services Description Language) contract files. 4 Appendix B: Command-Line Utilities TABLE B-1 Tool The .NET Framework SDK Configuration and Deployment Tools (continued) Description Web Services Discovery tool (Disco.exe) XML Schema Definition Tool (Xsd.exe) Allows you to discover the URLs of XML web services located on a web server. Generates XML schemas that follow the XSD language proposed by the World Wide Web Consortium (W3C). This tool generates Common Language Runtime classes and DataSet classes from an XSD schema file. Security Tools TABLE B-3 Tool The .NET Framework SDK Security Tools Description Certificate Creation Tool (Makecert.exe) Certificate Manager tool (Certmgr.exe) Certificate Verification tool (Chktrust.exe) Code Access Security Policy tool (Caspol.exe) File Signing tool (Signcode.exe) Permissions View tool (Permview.exe) PEVerify tool (PEVerify.exe) Secutil tool (Secutil.exe) Set Registry Tool (Setreg.exe) Software Publisher Certificate Test tool (Cert2spc.exe) Strong Name tool (Sn.exe) Creates X.509 certificates for testing purposes only. Manages certificates, certificate trust lists (CTLs), and certificate revocation lists (CRLs). Verifies the validity of a file signed with an X.509 certificate. Allows you to examine and modify security policies for the machine, user, and enterprise-level code access. Signs a portable executable (PE) file with an Authenticode digital signature. Allows you to view the minimal, optional, and refused permission sets requested by an assembly. You can also use this tool to display the declarative security used by an assembly. Conducts MSIL type-safety verification checks and metadata validation checks on an assembly. Extracts public-key information or Authenticode publisher certificates from an assembly. The output is formatted to be incorporated into code. Allows you to change the Registry settings for the Software Publishing State keys. Tests a Software Publisher’s Certificate (SPC), or creates an SPC from one or more X.509 certificates. Allows you to create assemblies with strong names. Visual Basic .NET Compiler (vbc.exe) 5 General Tools TABLE B-4 Tool The .NET Framework SDK General Tools Description Common Language Runtime Minidump tool (Mscordmp.exe) License Compiler (Lc.exe) Management Strongly Typed Class Generator (Mgmtclassgen.exe) MSIL Assembler (Ilasm.exe) MSIL Disassembler (Ildasm.exe) Resource File Generator tool (Resgen.exe) Windows Forms ActiveX Control Importer (Aximp.exe) Windows Forms Class Viewer (Wincv.exe) Windows Forms Resource Editor (Winres.exe) Creates a file containing a core dump of information that can be useful when analyzing system issues in the runtime. Allows you to create a .licenses file that can be embedded in a Common Language Runtime executable. It reads text files that contain licensing information. Allows you to quickly generate an early-bound class for a specified Windows Management Instrumentation (WMI) class. Generates a PE file from Microsoft Intermediate Language (MSIL). Produces a MSIL source file from a Portable Executable (PE) file. Converts text files and .resx (XML-based resource format) files to .NET Common Language Runtime binary .resources files that can be embedded in a runtime binary executable or compiled into satellite assemblies. Converts type definitions in a COM type library for an ActiveX control into a Windows Forms control. Finds managed classes matching a specified search pattern, and displays information about those classes using the Reflection API. Allows you to quickly and easily localize the Windows Forms forms in your application using a GUI tool. Visual Basic .NET Compiler (vbc.exe) In order to compile and run a Visual Basic .NET program, you will need to have the .NET Framework installed on your computer. Microsoft has made the .NET Framework available as a free upgrade, and you can either download it from http://msdn.microsoft.com (approximately 130MB) or order a CD that contains the .NET Framework. ... - tailieumienphi.vn
nguon tai.lieu . vn