Configure editplus and Nant to build a lightweight. Net Development Environment

Source: Internet
Author: User
Document directory
  • Example

The procedure is as follows:
Configure editplus first.The commonly used text editors include editplus, ultraedit, and notepad. I prefer editplus, which has the unique code completion function. It is really nice! However, editplus2 does not support C # syntax highlighting. After a Google click, I found a C # syntax file written by a cool man to share it with you! I also want to teach you how to configure C # compilation tools in EP.

First, download the syntax file of the C # file:
1. Download the C # syntax file;
2. decompress the downloaded ZIP file and put the CSHARP. STX file and CSHARP. ACP file in the EP installation directory.
Even "C:/program files/editplus 2", you can find it by yourself;
3. Choose "toolbar-> Configure user tool" in editplus, as shown in the following figure:
In the "syntax file" column, set it to "C:/program files/editplus 2/CSHARP. STX"
Set "C:/program files/editplus 2/CSHARP. ACP" in the "auto-completion" column"
This completes the settings!
Pay attention to the description and extension. You can set it yourself!

Then let's configure the C # compilation environment:

Click "toolbar-> Configure user tool" in editplus to open:
1. Select tool> User Configuration tool. In the displayed dialog box.
2. Click "group name" and enter "C #" in "New name" to confirm
3. Click "add tool" and select "application". Then, write "degub C #" to "menu text #"
4. Input "C:/Windows/Microsoft. NET/framework/v1.1.4322/csc.exe" in the menu command"
(Note: In Windows, the author uses the WINXP operating system. If you are using another system, make sure to modify it. Otherwise, errors may occur. Instead, let editplusfind the csc.exe file .)
5. Enter "/Target: Library/out: $ (filedir)/bin/$ (filename). dll $ (filename)" in the parameter )"
(Note: If you want to generate other types of files, see "Visual C #. Net compiler options ".
For example, to generate a console Executable File
Parameter input: "/Target: EXE/out: $ (filedir)/bin/resize (filename=.exe $ (filename )")
6. Enter "$ (filedir)" in the initial directory )"
7. Check "Capture output" and click "Apply.
Next, open a XXX file by yourself. CS file, click (Tool)-> "Debug C #", and you will see XXX in your/bin folder. DLL file! (Note: You must have a bin folder under your directory. If you do not have a bin folder, you cannot compile editplus)

Use vb.netto compile asp.net's method and example. You only need to change csc.exeto the corresponding vbc.exe.

Then configure Nant.Many articles have introduced the use of Nant. Here, you only need to use the function of compiling the solution, and the build file is much simpler. Nant build files are written in XML. Each file contains a project and several objects, and each object contains several tasks (TAEK ). The following is a simple Build File for compiling the helloworld (C #) project. The following is a simple Build File example:

<? XML version = "1.0"?>
<Project name = "testweb" default = "build" basedir = ".">

<Property name = "solution. FILENAME" value = "testweb. sln"/>
<Property name = "solution. Configuration" value = "debug"/>
<Property name = "build. outputfolder" value = "bin"/>

<Target name = "sln">
<Record Name = "nantbuildlog.txt" Action = "start"/>
<Solution solutionfile = "$ {solution. filename}" outputdir = "$ {build. outputfolder}" configuration = "$ {solution. Configuration}">
<Webmap>
<Map url = "http: // localhost/testweb. csproj" Path = "testweb. csproj"/>
</Webmap>
</Solution>
</Target>

<Target name = "build">
<Call target = "sln"/>
</Target>
</Project>

Finally, you can write a simple batch processing file.For future compilation, you only need to double-click the file. The content is as follows:
Path = D:/Nant/bin (bin directory of Nant)
CD testweb (path of the default. Build File)
Nant

Example

In the examples folder, you can find the files required to run these particles.

Nant: Run Nant in debug mode (default) and build the project.

Nant clean: Run Nant and delete compiled files.

Nant-D: DEBUG = false: Run Nant in non-debug mode and generate the project. Although the debug attribute of the build file is true, the value set in the command line will not be affected, just like<property>The "Overwrite" attribute in the task is set to false ).

Note: if the date of the generated file is earlier than the date of the source file, only tasks such as compiler tasks will be executed. If you compile the helloworld project in debug mode without clearing anything and re-compile it in no-debug mode, this will happen, because the Nant project does not need to be regenerated. Such a development environment is of course very weak compared to powerful vs. net, and also relies on vs. Net solution files. But because of its small size, it is useful when you need to modify a little bit of code and do not want to install huge vs. net!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.