Sublime Forum

VSCode .NET and Sublime

#1

No reply required, just putting some thoughts out there, maybe I have a vague question or two…

I’m on a course, that was supposed to be Python, but has ended up being largely MS Azure. As it’s a MS project they ‘push’ the .NET environment and the use of VSCode.

Having used VSCode a bit now, and not really having a great relationship with MS, I now see:

a) why there was some of the ‘fanatical devotion’ to ST, which I encountered in my early days of using this forum. (Which also seems to have eased off, although I haven’t read everything throughly recently. Fanatasism dying off can only be a good thing)

b) that combined with the ST’s ludicrously small dev team, that ST is such an amazing achievement.

c) that even vscode doesn’t seem to have a dedicated customer service team (though it’s open source so totally different of course, one of the many differences)

However, not that I’m a fan of MS, Azure looks like it’s not a bad product. (and it’s documentation is really good too).
(Office et al is terrbile and Edge is the worst browser for running MS software (on my machines), a fact i find amazing.)
Considering what MS wants/is to do/ing, Azure can’t afford to be a bad product and in conjuntion the .NET framework looks pretty good…
(Although I’m not a fan of VSCode, you never get over your first love, no matter how rocky :kissing_heart:):

Thus I was wondering before I try and work it all out myself has anyone got any experience of replacing vscode with ST in the dotnet environment ?
I’m imagining (am on linux) it’s just a case of installing .NETCore and I can just swap out vscode (not sure even if it comes with .NET) and then maye getting a few c# packages for ST.

Any thoughts anyone ?

It’s a vague question, that doesn’t really require an answer, I’m just having a bit of a waffle, whilst I put off revising for my exam (az-204).

Hope everyone’s doing ok in STworld, I never realised how blind I was :wink: !

ATB Lozminda

0 Likes

#2

I install dotnet (on Linux, Windows or whatever), make sure that it’s set up properly such that the commands are available from the command line, and then use this build:

{
    "working_dir": "${folder:${project_path:${file_path}}}",
    "selector": "source.cs",

    "variants":
    [
        {
            "name": "Build",
            "shell_cmd": "dotnet build",
            "word_wrap": false,
            "quiet": true,
        },
        {
            "name": "Clean",
            "shell_cmd": "dotnet clean"
        },
        {
            "name": "Run",
            "shell_cmd": "dotnet run"
        },
        {
            "name": "Run Interactive",
            "shell_cmd": "dotnet run",
            "target": "terminus_exec"
        }
    ],
}

Sublime has syntax highlighting for C# out of the box, and the build allows you to build, run and even interactively run your code if you desire.

I don’t use any extra third party packages at all because it’s not needed, but if you like to lean on IDE type features to work you probably want something like LSP in combination with LSP-OmniSharp to get you there.

1 Like

#3

Thanks Mr. Martin

Great stuff. It’ll all prob have to wait for after the exam, even though learning this way would be more fun (ie installing .NET and making stuff) unfortunately my revisoin needs to be more targetted. Will get onto it post exam. We’re also learing Python too, so can’t wait to start writing some stuff for ST.

As for LSP, been thinking about getting that up and running; more as an exercise and to see what it can do rather than actaully needing it. I quite like learning without text editor/IDE help, nothing like the pain of debugging to help you get things right. Mind you if LSP can stop those badly placed semi and full colon errors probably worth the investment.

As you can probably tell from the waffle, I should be revising. Thanks again, great advice, ta.

:rabbit::hocho:

0 Likes