Ten must-have .NET development gadgets (1): Snippet Compiler

xiaoxiao2021-03-06  51

Author: James Avery translation: lucentoff

Source: http://msdn.microsoft.com/msdnmag/issues/04/07/musthavetools/default.aspx declaration: The copyright belongs to the original author, reproduced please indicate the source!

This article will introduce the following tools:

· Code Fragment Compilation Tool: Snippet Compiler

· Regular expression build tool: Regulator

· Code generation tool: CODESMITH

· Unit test tool: NUnit

· Code analysis and inspection tools: FXCOP

· .NET assembly inspection tool: .NET Reflector

· Code document creation tool: NDOC

· Solution Compilation Tool: Nant

· Version Switch and Conversion Tools: ASP.NET VERSION SWITCHER and VISUAL Studio .Net Project Converter

There is no good tool, you can't write a good program. In addition to well-known tools (for example, Visual Studio? Net), there are many unwarable gadgets in .NET community. This article will briefly introduce some good tools for .NET development and how to use it, and some will save your program from all aspects, and some may thoroughly change your way of writing code. Since talking so much in an article, I can't make a comprehensive introduction, but you should fully understand them and determine which are useful for you. Snippet Compilersnippet Compiler is a Windows-based minor application that uses it to write, compile and run. NET code. This tool is useful if you have a small code to test and don't want to specifically create a complete Visual Studio .NET project. This tool is useful.

For example, I want to show you how to call up the NOTEPAD application from Microsoft? .NET Framework, the code snippet is as follows:

System.Diagnostics.Process Proc = New System.diagnostics.Process ();

Proc.startinfo.filename = "notepad.exe";

proc.start ();

Proc.waitForexit ();

I can create a newly built a default console application in Snippet Compiler (the translation: code frame is generated), and then writes the code snippet in its main method, as shown in Figure 1.

Figure 1 SNIPPET COMPILER

To test this code, just press the Start button (green triangle) on the toolbar, it will run in debug mode. This code generates a console window and then calls up the notepad. Close NotePad, the console window is closed.

I found that Snippet Compiler is very useful when writing a small routine for help. Usually, I must first create a project to ensure that all code is compiled, send the code snippet to the help, and then delete the project. With SNIPPET Compiler, this process is easy.

Snippet Compiler is written by Jeff Key, you can download from here: http://www.sliver.com/dotnet/snippetCompiler.

[The following is the translator to add, taken from: http://royo.is-a-geek.com/regulator]

Snippet Compiler Main Features: Compile and run one or more C #, VB.NET and ASP.NET code snippets can choose to compile WinForm EXE files, console exe files, or DLL file users can store template libraries

Show compilation errors and warnings, including in the editor

Intelligent Induction (IntelliSense) static member, method and constructor signature Import vs.net project easy to place the taskbar notification area

Export the code snippet as an HTML file or RTF file

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

New Post(0)