Code snippet compilation tool
1. Tool Overview
Snippet compiler is a Windows-based small application that allows you to write, compile, and run code. Snippet compiler now supports. NET Framework 3.5. The latest version is snippet compiler live 2008 Ultimate Edition for developers (alpha ).
Official homepage: http://www.sliver.com/dotnet/SnippetCompiler/
2. Application scenarios
If you have a small code segment and you do not want to create a complete Visual Studio project and all the files attached to the project, this is the use of snippet compiler. If we want to write this code segment in notepad, not only does it have no smart prompt function, but it is prone to errors. After compilation, we also need to use the command line for compilation, which is very troublesome; if you create a visual stuido project and create a visual Studio project for a small code segment, it is not worth it. This is the strength of snippet compiler.
3. Introduction
After downloading snippet compiler, run the executable file without installation. At the first run, it will prompt you how to create a shortcut. After running, the default language is C #. You can directly write your code snippets in the runsnippet () method, as shown in:
After writing the code, if you want to perform a test, click the start button on the toolbar, as shown in. The compilation error or output result is displayed in the errors and output windows:
If you want to write code snippets in the VB. NET language instead of C #, you can set them in the options tab, as shown in:
Another new feature of snippet compiler is that it supports two versions.. NET Framework, respectively. net Framework 2.0 with SP1 and. net Framework 3.5, which can be selected according to the actual situation during compilation:
By default, snippet compiler adds some common assemblies. If other assemblies need to be used in the code snippets, you can use the reference manager, select the tools> references menu to add or delete an assembly, as shown in:
Code Analysis Tools
1. Tool Overview
Microsoft Source Analysis for C # Is a C # (VB is not supported. net) code specification check tool, formerly known as the Microsoft internal code specification check and code format force tool stylecop, is designed to help the project team execute a series of common source code format specifications, it checks against the predefined best practices of c # code format. Unlike fxcop, it checks the source code directly and does not provide flexible rule settings, force developers to write C # code using the same habits.
2. Application scenarios
When the source code specification needs to be implemented in the team, and this specification cannot be customized, but fully complies with the design principles of Microsoft. NET class libraries.
3. Introduction
The use of source analysis for C # is very simple. In Solution Explorer, select the file for code analysis and right-click the menu to run source analysis.
Tip: or press the shortcut key shift + Ctrl + Y to run code analysis.
After the source code is analyzed, the analysis result is displayed in the source analysis result window. The information about the code that does not comply with the. NET Class Library Design Guidelines and the description that does not comply with is displayed.
This article first introduces two of the ten essential tools for the new. NET development. These two tools are relatively easy to use. I will introduce the use of other tools in the next article. I hope you will continue to pay attention to them.