0

I've installed Sublime Text 2 and I'm wishing to use it in conjuction with C#, but for some reason I can't build my code. The error I'm getting:

Project "D:\PannariBranch\Dropbox\dev\build.cs" on node 1 (default targets).
D:\PannariBranch\Dropbox\dev\build.cs(1,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.
Done Building Project "D:\PannariBranch\Dropbox\dev\build.cs" (default targets) -- FAILED.

Build FAILED.

"D:\PannariBranch\Dropbox\dev\build.cs" (default target) (1) ->
 D:\PannariBranch\Dropbox\dev\build.cs(1,1): error MSB4025: The project file could not be    loaded. Data at the root level is invalid. Line 1, position 1.

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:00.03
[Finished in 0.8s with exit code 1]

This is my build configuration:

{
"cmd": ["msbuild", "$file"],
"working_dir": "${file_path:${folder}}",
"file_regex": "^\\s*(.+?)\\(([0-9]+),?([0-9]+)?\\):\\s*(.*) \\[",
"shell": true,
"selector": "source.msbuild",
"windows":
{
    "path": "%PATH%;%WINDIR%\\Microsoft.NET\\Framework\\v4.0.30319;%WINDIR%\\Microsoft.NET\\Framework\\v3.5;%WINDIR%\\Microsoft.NET\\Framework\\v2.0.50727"
},
"linux":
{
    "cmd": ["xbuild $file"]
},
"variants": [
    {
        "cmd": ["msbuild", "/m", "$file"],
        "file_regex": "^\\s*\\d*>?\\s*(.+?)\\(([0-9]+),?([0-9]+)?\\):\\s*(.*) \\[",
        "name": "Parallel Build",
        "linux":
        {
            "cmd": ["xbuild /m $file"]
        }
    },
    {
        "cmd": ["msbuild", "$file", "/p:Configuration=Debug"],
        "name": "Debug Configuration",
        "linux":
        {
            "cmd": ["xbuild $file /p:Configuration=Debug"]
        }
    },
    {
        "cmd": ["msbuild", "$file", "/p:Configuration=Release"],
        "name": "Release Configuration",
        "linux":
        {
            "cmd": ["xbuild $file /p:Configuration=Release"]
        }
    }
]
}

All help would be much appreciated. :)

Tatu
  • 153
  • 1
  • 1
  • 9
  • It looks to me like you are trying to build a single .cs file rather than a C# project (.csproj) or solution (.sln). – Jay Apr 03 '14 at 13:18
  • So I should make a project before trying to build it? Sorry, I'm completely new to C# and I'm starting out with it. – Tatu Apr 03 '14 at 13:19
  • I'd recommend getting the free Visual Studio tools from Microsoft for starting out. At least you can use VS to create the project structure and then edit everything in ST if you wish. – Jay Apr 03 '14 at 13:22
  • So, Visual Studio Express 2013? – Tatu Apr 03 '14 at 13:24
  • Yes; I believe it should be free. – Jay Apr 03 '14 at 13:50

0 Answers0