MonoGame in Visual Studio Code

The application does compile + runs fine, but I can’t guarantee that everything is feature complete. I still have to evaluate the boundaries.

Running MonoGame on Ubuntu 18.10
Running MonoGame on Ubuntu 18.10


Create a new project by typing following command in the Visual Studio Code Terminal: “dotnet new console”. Open the “.csproj” and paste in following XML.

<?xml version="1.0" encoding="UTF-8"?>
<Project Sdk="Microsoft.NET.Sdk">
      <SrcFolderReference Include="**\*.cs" />
      <MonoGameContentReference Include="**\*.mgcb" />
      <PackageReference Include="MonoGame.Content.Builder" Version="" />
      <PackageReference Include="MonoGame.Framework.DesktopGL.Core" Version="" />

The NuGet Package Manager plugin should automatically download all the required dependencies. Generate a new launch configuration: Debug -> Add Configuration. Open the launch.config in the .vscode folder and paste following snippet.

    // Use IntelliSense to find out which attributes exist for C# debugging
    // Use hover for the description of the existing attributes
    // For further information visit
    "version": "0.2.0",
    "configurations": [
             "name": ".NET Core Client",
             "type": "coreclr",
             "request": "launch",
             "preLaunchTask": "Build Client",
             // If you have changed target frameworks, make sure to update the program path.
             "program": "${workspaceFolder}/ToDo/bin/Debug/netcoreapp2.1/ToDo.dll",
             "args": [],
             "cwd": "${workspaceFolder}/ToDo/",
             // For more information about the 'console' field, see
             "console": "integratedTerminal",
             "justMyCode": true,            
             "stopAtEntry": false,

“program” refers to the compiled library. In my case, I have following project structure.

  • .vscode
  • ToDo
    • bin
      • Debug
        • ….

Add a new build configuration: Terminal -> Configure Tasks. Open the generated tasks.json in the .vscode folder and paste in following snippet

  "version": "2.0.0",
  "tasks": [
      "label": "Build Client",
      "command": "dotnet",
      "type": "process",
      "args": [
      "problemMatcher": "$msCompile"

Here you go. You are ready to build and run. Have fun.


An example of windows can be found here. (Source: Andrew King)

0 0 vote
Article Rating
Notify of
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
Andrzej Jóźwiak

Could you advise me how to setup mgcb? From the screenshot I noticed that the tool is showing for you and is building resources.