Search code examples
c#visual-studio-codemonogame

Monogame VsCode extension isn't working properly when I try to use it


I tried to use The VsCode extension monogame-pipeline-vscode, but it doesnt work. There is no documentation, and I cant figure it out. I can install it fine, but when I right click the mgcb file I want to open, then click "Open In Pipeline", It doesnt work. Is there something I need to install first?

Here is the id thing for the extension:

abcdef.monogame-pipeline-vscode


Solution

  • First, ensure you have installed the Monogame Pipeline. You can install the mgcb-editor tool with the following script:

    dotnet tool install --global dotnet-mgcb-editor
    mgcb-editor --register
    

    Next, edit the setting in VS Code's setting.json as

    "mgcb.pipelineToolPath": "mgcb-editor"
    

    Needless to say, this will invoke the mgcb-editor command along with the file path of the *.mgcb file as parameter. If you have the older version of the pipeline tool installed elsewhere, you'll need to enter the path accordingly.