Here is my nppexec script for C # (.NET 3.5) to compile the current open file and run:
"c:\WINDOWS\Microsoft.NET\Framework\v3.5\csc.exe" /out:"$(FULL_CURRENT_PATH).exe" "$(FULL_CURRENT_PATH)"
"$(FULL_CURRENT_PATH).exe"
In the menu "Plugins → NppExec":
Select "Save all files on execute"
Select "Follow $(CURRENT_DIRECTORY)".
Answers to your questions:
1) Use double quotes (") for the full csc path, for example, my configuration.
2) At least for .NET 3.5, only the full path to csc is enough, there is no need to load VS environment variables.
3) It is better to choose "FOLLOW $ (CURRENT_DIRECTORY)" so that the compiled EXE is in the same directory.
source
share