Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error on running Scriptcs with Sublime Text 3

I have installed Scriptcs to Sublime Text 3.
I get this error when I press CTRL B and build my aspx page.

'scriptcs' is not recognized as an internal or external command, operable program or batch file.

I'm trying to run my aspx page on Sublime.
How can I fix this ? Thanks.

like image 494
tubefavorites.com Avatar asked Feb 26 '19 12:02

tubefavorites.com


1 Answers

You need to add scriptcs to you PATH environmental variable, otherwise the system cannot find the executable.

The process is described in the ScriptCS documentation:

For simplicity, we will be using the Chocolatey Nuget method of installation. Copy and paste the following command into your console. This will execute a PowerShell script that will download Chocolatey, place it on your local drive, and configure your path. Make sure to reload your session so your new path is loaded.

@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

Next execute the following command in your console. This will download ScriptCS, place it on your local drive, and configure your path. Make sure to reload your session again so your new path is loaded.

cinst scriptcs

If you prefer adding scriptcs to your PATH manually (or simply want to get a better general understanding of PATH), have a look at this excellent answer.

like image 177
idleberg Avatar answered Nov 12 '22 00:11

idleberg