Check out example codes for "vs code run and build task c#". It will help you in understanding the concepts better.

Code Example 1

"tasks": [
        {
            "label": "build",
            "command": "dotnet",
            "type": "shell",
            "args": [
                "build",
                "/property:GenerateFullPaths=true",
                "/consoleloggerparameters:NoSummary"
            ],
            "group": "build",
            "presentation": {
                "reveal": "silent",
                "echo": false
            },
            "problemMatcher": "$msCompile"
        },
        {
            "label": "run",
            "dependsOn": ["build"],
            "command": "dotnet",
            "args": [
                "run"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "presentation": {
                "reveal": "always",
                "echo": false
            }
        }
    ]

Learn ReactJs, React Native from akashmittal.com