简体   繁体   中英

Compile C# project with Emacs

I use emacs to code and compile C# project.

My project folder contain:

--\test
----Helloworld.cs
----make.bat

Then I open Helloworld.cs in a buffer and Mx compile, emacs will compile project for me.

But if my project folder construction is like this:

--\test
----\src
------Helloworld.cs
----make.bat

Then I open Helloworld.cs in a buffer and Mx compile, emacs cannot find make.bat.

I have to locate make.bat for "compile command" in minibuffer.

Any help is welcome.

emacs编译通常从源所在的同一目录运行。将Mx编译命令设置为../make.bat (或给它一个绝对路径),然后一切正常。

If ../make.bat works, then indeed it's a good option. If not, you can use cd ../; ./make.bat cd ../; ./make.bat as your compilation command instead. You could even make Emacs look up the directory hierarchy for a make.bat file and add as many ../ as needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM