darkside40 91 Posted July 23, 2021 Share Posted July 23, 2021 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? Link to comment Share on other sites More sharing options...
Luke 37053 Posted July 23, 2021 Share Posted July 23, 2021 Hi, at Emby we use a higher version, but I know other users here use Visual Studio Code. Link to comment Share on other sites More sharing options...
roaku 795 Posted July 23, 2021 Share Posted July 23, 2021 (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 July 23, 2021 by roaku Link to comment Share on other sites More sharing options...
darkside40 91 Posted July 23, 2021 Author Share Posted July 23, 2021 Sound great so it seems possible. How do you build your projects on the CLI? Link to comment Share on other sites More sharing options...
roaku 795 Posted July 23, 2021 Share Posted July 23, 2021 3 minutes ago, darkside40 said: Sound great so it seems possible. How do you build your projects on the CLI? The basic command is: dotnet build But it accepts a bunch of optional arguments: dotnet build --configuration Release https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-build#examples Link to comment Share on other sites More sharing options...
billg 1 Posted August 7, 2021 Share Posted August 7, 2021 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 } } ] } $ 1 Link to comment Share on other sites More sharing options...
rbronco21 11 Posted January 17, 2022 Share Posted January 17, 2022 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? Link to comment Share on other sites More sharing options...
BillOatman 500 Posted January 17, 2022 Share Posted January 17, 2022 (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 January 17, 2022 by BillOatman Link to comment Share on other sites More sharing options...
rbronco21 11 Posted January 17, 2022 Share Posted January 17, 2022 VS Community? How many versions are there now? Thanks, I’ll go with VS Community then. Link to comment Share on other sites More sharing options...
BillOatman 500 Posted January 17, 2022 Share Posted January 17, 2022 (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 January 17, 2022 by BillOatman Link to comment Share on other sites More sharing options...
rbronco21 11 Posted January 17, 2022 Share Posted January 17, 2022 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? Link to comment Share on other sites More sharing options...
BillOatman 500 Posted January 17, 2022 Share Posted January 17, 2022 (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 January 17, 2022 by BillOatman 1 Link to comment Share on other sites More sharing options...
darkside40 91 Posted January 18, 2022 Author Share Posted January 18, 2022 And if your are on Linux, use for example VSCodium which is VS Code with the Mircrosoft Telemetry disabled. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now