CS-Script - How Can I Run a '.cs' File Like A Standard Windows Executable?

Viewed 6736

I have recently installed CS-Script, a scripting system for C# (as well as VB.NET, C++/CLI and J#).

CS-Script allows you to write a program in standard C# syntax (or in other languages supported by CS-Script) and run it without first compiling it to an executable! In this way, CS-Script offers the benefits of Windows Script Host (WSH) and other scripting frameworks and languages.

By default, when you double-click a .cs file, CS-Script is configured to to open it with Notepad. Instead, I actually wanted to change this so that double-clicking the .cs file would run the script. I was able to make this change by running the CS-Script configuration program css_config.exe, and under Open (double-click action), selecting <Run>.

Now, a question: There is one more thing I want to do--I'd like to be able to put a .cs file somewhere in my system path and run it like any other standard Windows executable. (For example, .exe, .bat and .cmd files.) Is this is possible?

1 Answers
Related