Jump to content

Recommended Posts

darkside40
Posted

Is anybody here using Visual Studio Code to write plugins for Emby?

Normally i am working 100% under Linux, but if i want to tweak something regarding my Emby plugins i am forced to use Windows because  of normal Visual Studio.

Could anyone point me in the right direction if possible?

Posted

Hi, at Emby we use a higher version, but I know other users here use Visual Studio Code.

Posted (edited)

I use VSCode on Linux (Ubuntu) and build with dotnet on the terminal.

I'm no expert, but my recollection was that when VSCode detects C#, it volunteers to install the appropriate syntax and other libraries.

Installing dotnet involved following the directions here:
https://docs.microsoft.com/en-us/dotnet/core/install/linux
 

It's possible to have VSCode build for you too, but I got annoyed trying to get that set up and just stuck with building from the terminal.

 

Edit: I'm not in front of my dev machine to check, but it's possible I'm running VSCodium rather than VSCode, but that doesn't really change anything about the above.

Edited by roaku
darkside40
Posted

Sound great so it seems possible.

How do you build your projects on the CLI?

  • 2 weeks later...
Posted

Here's my tasks.json file in my plugin directory. I don't recall any other changes to the editor I made to build beyond installing C# plugin in VSCode and dotnet system-wide.

$ cat .vscode/tasks.json
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build Debug",
            "command": "dotnet",
            "type": "process",
            "args": [
                "build",
                // Ask dotnet build to generate full paths for file names.
                "/property:GenerateFullPaths=true",
                // Do not generate summary otherwise it leads to duplicate errors in Problems panel
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        },
        {
            "label": "build Release",
            "command": "dotnet",
            "type": "process",
            "args": [
                "build",
                "-c",
                "Release",
                // Ask dotnet build to generate full paths for file names.
                "/property:GenerateFullPaths=true",
                // Do not generate summary otherwise it leads to duplicate errors in Problems panel
                "/consoleloggerparameters:NoSummary"
            ],
            "problemMatcher": "$msCompile",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}
$ 

 

  • Agree 1
  • 5 months later...
Posted

I use VS at work and need 3 different versions installed to support old software. I’m not a developer so this stuff mystifies me. Does Code have versions? Do I need an old version to compile plug-ins? I’m looking at Emby’s example here. Are there others?

BillOatman
Posted (edited)
3 hours ago, rbronco21 said:

I use VS at work and need 3 different versions installed to support old software. I’m not a developer so this stuff mystifies me. Does Code have versions? Do I need an old version to compile plug-ins? I’m looking at Emby’s example here. Are there others?

I've never tried to use VSCode for plugins as I use Windows and Visual Studio Community Version is free..  But I use the latest VS 2022 for plugins now with no issues.  You don't need old versions of VS, but you do need to use .net standard 2.0 .

Edited by BillOatman
Posted

VS Community? How many versions are there now? Thanks, I’ll go with VS Community then. 

BillOatman
Posted (edited)
2 minutes ago, rbronco21 said:

VS Community? How many versions are there now? Thanks, I’ll go with VS Community then. 

MS seems to release new versions of visual studio every 2 years ish.  2022 is the most recent.  

Link

Edited by BillOatman
Posted

I thought I figured it out, but I’ve confused myself. You use the full VS2022, not Code or Community? This is off topic, but what is the difference between the 3? Are Code and Community known to work?

BillOatman
Posted (edited)
10 hours ago, rbronco21 said:

I thought I figured it out, but I’ve confused myself. You use the full VS2022, not Code or Community? This is off topic, but what is the difference between the 3? Are Code and Community known to work?

"Full" commercial Visual Studio:  Not free, commercial product.  Works for creating Emby plugins.

Visual Studio Community Edition:  Free for personal use. Same as the commercial version, minus a few features.  Works for creating Emby plugins.

Visual Studio Code:  Free, limited capability product that runs on more things than Windows.  I use it mainly as a editor, but it does have some debugging and I believe build capabilities,  I have only used it as an editor, nothing more, so I am far from an expert on it.  It does have Git capabilities. It is my belief that plugins could be built with it, but I'm not sure.

I use both the full commercial version and community edition, depending upon where I am sitting at the time (work or home :) ).

If you use Windows, my recommendation by far would be to not use VS Code, use either the commercial or community version of Visual Studio.

Edited by BillOatman
  • Thanks 1
darkside40
Posted

And if your are on Linux, use for example VSCodium which is VS Code with the Mircrosoft Telemetry disabled.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...