Use the .NET Framework command line tool

xiaoxiao2021-03-06  40

Using the .NET Framework command line tool Visual Studio .NET is the most popular way to develop .NET applications, .NET framework provides a lot of command tools. In addition, .NET Framework SDK also provides more command line tools. In fact, IDE like Visual Studio and SharpDevelop is usually available to these tools. Let's take a detailed look at these tools installed with .NET Framework, and how to use them in the project. (Note: I am using the .NET Framework 1.1 version in this article.)

Use .NET Framework

The default installation directory of the .NET Framework command line program is:

C: / (Base Windows Directory / Microsoft.Net/framework/ (Framework Version)

On my computer, because the installed operating system is Windows 2000, the .NET Framework 1.1 version is installed in the Winnt directory, so its path is:

C: /Winnt/Microsoft.Net/framework/v1.1.4322

This directory contains countless DLLs, configuration files, and executables, and so on. In this article, I will put the focus on the executable. Below is an outline of these programs:

· Al.exe: ASSEMBLY LINKER, which generates a file with an assembly list from one or more modules or resource files. The module is a Microsoft Intermediate Language File (MSIL) without an assembly list. All Visual Studio compilers generate an assembly. However, if you have one or more modules (there is no list of metadata), you can create an assembly using the Al.EXE tool to create an assembly in a list of separate files.

· ASPNET_REGIIS.exe: This tool allows you to install ASP.NET on IIS. In addition, it simplifies the use of multiple ASP.NET versions of simultaneous run. It allows you to update scripts to the ASP.NET application to point to the ASP.NET ISAPI version associated with the tool. This tool can also be used to display the status of all installed ASP.NET versions, register an ASP.NET version, and tools to create a client scripting directory to complete other configuration operations.

· ASPNET_STATE.EXE: This tool allows session status information to be stored on a computer. It runs in a service, if the session status information is stored on a remote computer, the tool can also be installed on the remote computer.

· Caspol.exe: Code Access Security Policy Tool that allows users and administrators to modify security policies in machine policy levels, user policy levels, and corporate policy levels. You can use Caspol.exe to write a batch script to configure a security policy.

· ConfigWizards.exe: This tool launches the .NET wizard window (Windows Control Panel | ADMINISTRATIVE TOOLS | Microsoft .NET Framework Wizards 1.1). It provides access to the following three tools: Adjust .Net Security, Trust An Assembly and Fix An Application.

· CSC.EXE: Visual C # compiler. / debug switch enters debug mode.

· CVTRES.EXE: Resource Object Converter (resource conversion to object). This tool is usually used to convert a binary resource file to an object file. Local resources are usually started in .RC file, then compiled into a .res file being compiled by rc.exe, then transfer to a .Obj file, which is linked to your local application like other .Obj files. in. DW15.EXE: This tool gives the error message you want to see when using .NET Framework. Error message Ask you if you want to send an error report to Microsoft. (Many users accused this applet are Microsoft's spyware.)

· Gacutil.exe: Global Assembly Cache tool, which is used to manage assembly caches. It can be used to view the content of global cache, add or delete an assembly. To use this tool to list all the assemblies of the global assembly cache (GAC), you can use the / L switch. (/ I switch installation assembly, / U switch delete assembly.)

· IEEXEC.exe: This tool simplifies the test of the application that uses the URL startup, including applications that do not develop Windows Form. Tools IEEXEC.EXE can replace these applications instead of IDE. It only accepts URL parameters (for example, ieexec.exe http: //server/theapplication.exe; it does not allow specified locale and site settings. If you try to specify the area settings and site settings, there will be an error.

· ILASM.EXE: MSIL assembler, which generates a portable executable (PE) from the MSIL program set. You can run the generated executable to determine if MSIL has generated something you want.

· Installutil.exe: Installer Tool, which allows you to perform installer components in a specified program to install and uninstall server resources. This tool is jointly working with classes in the System.configuration.install namespace. For example, this tool will be used when installing a Windows service.

· JSC.exe: A _JSCIPRT .NET compiler. / debug switch enters debug mode.

· Migpol.ex: Migration Policy Tool provides the ability to migrate policies between two compatible .NET Framework versions.

· NGen.exe: Native Image Generator, which creates a native image from a managed assembly and install it on the native image cache located in the local computer. The native image cache is the reserved area of ​​the GAC. Once you create a native image for an assembly, then the assembly runs automatically when running every time you run.

· Regasm.exe: ASSMBLY Registration tool, the tool reads metadata in a program set, adds the necessary entries to the registry; this allows the COM client to create a .NET Framework class. After the .NET Framework class is registered, any COM client can use it, as if it is a COM class. The .NET Framework class will only be registered once, which is registered when the assembly is installed. The instances they cannot create from COM before the .NET Framework class is registered. · Regsvcs.exe: This service installation tool can be used to load and register assemblies, registration, and installation type libraries, or configured to add to a class service. Regsvcs.exe requires a source assembly file specified by assemblyfile.dll. This assembly must use a strong name sign. The Sn.exe is provided in the .NET Framework SDK.

· Vbc.exe: Visual Basic .NET compiler. / debug switch enters debug mode.

· Vbj.exe: Visual J # .NET compiler. / debug switch enters debug mode.

These tools can be developed all .NET development. Most of these tools support command line switches (that is, after the command line will pick up a slash). These switches allow you to specify settings or other aspects of the tool (like the compiler / debug option). You can enter /? Or / HELP getting up /? Or / HELP will get a complete list of tool command line switch options. This provides you with complete syntax information for your tool.

I usually like to use the friendly Visual Studio .NET environment, but after visiting a customer, I will now enjoy the command line option. I got to the code that has been changed there, but I have to do additional changes now. These changes need to be recompiled code, but my machine does not have Visual Studio .NET. Fortunately, I can use the command line tool to complete these work.

Select interface

Many developers like Visual Studio .NET and other development tools graphics, but another failed developers really like the control provided by the command line environment. What people feel is pleased that Microsoft provides these two ways to develop applications, which means which method is to see your preference.

转载请注明原文地址:https://www.9cbs.com/read-74503.html

New Post(0)