第一种方法,使用NppExec插件
1.下载安装插件 NppExec
https://nchc.dl.sourceforge.net/project/npp-plugins/NppExec/NppExec%20Plugin%20v0.6%20RC2/NppExec_06RC2_dll_x64.zip
把文件解压到Notepad++安装目录下的plugins
2.命令的配置
插件 NppExec----Execute...----Command(s):
NPP_SAVE
CSC $(FULL_CURRENT_PATH)
cd "$(CURRENT_DIRECTORY)"
$(NAME_PART).exe
save----C#----save----ok
3.运行
编译执行,插件NppExec----Execute(OK)
重复执行,Direct Execute Previous
注:插件NppExec菜单,勾选Follow $(CURRENT_DIRECTORY),否则在notepad++目录下生成编译文件.exe
第二种方法,运行,保存,编辑快捷
cmd /K csc.exe /t:exe /out:$(FULL_CURRENT_PATH).exe $(FULL_CURRENT_PATH) &$(FULL_CURRENT_PATH).exe& PAUSE & EXIT
或者
cmd /K csc.exe /out:$(NAME_PART).exe $(FULL_CURRENT_PATH) &$(NAME_PART).exe& PAUSE & EXIT
unsafe编译
cmd /K csc.exe /unsafe /out:$(NAME_PART).exe $(FULL_CURRENT_PATH) &$(NAME_PART).exe& PAUSE & EXIT
plugin manager的下载地址:
https://github.com/bruderstein/nppPluginManager/releases