ScriptCS with Sublime

1.7k Views Asked by At

I'm getting the exception in Sublime:

Unbehandelte Ausnahme: [Decode error - output not cp1252]

by running this code:

Console.WriteLine("fsdfsd")

I installed Sublime Text 2 and 3 by installer and scriptcs by Chocolatey.

Then I added a file with following content:

{
 "cmd": ["C:\\Chocolatey\\lib\\ScriptCs.0.5.1\\tools\\scriptcs\\scriptcs.exe", "$file"],
 "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
 "encoding": "cp1252"
 }

as a scripts.sublime-build in Packages\User

How can I rid of it?

Thanks in advance!

2

There are 2 best solutions below

2
On

You should install the scriptcs sublime plugin (Package Control: Install Package > scriptcs) which includes syntax highlighting, some snippets and a build system (CTRL + B). You can find the source code for the plugin here. I hope this solves your problem.

0
On

change "encoding": "cp1252" to "encoding": "utf-8"