title: Visual Studio Code cannot build the default dotnet core class library
body: <p>I cannot get VS Code to build an empty class library while dotnet core can quite happily.</p>
  
  <p>In PowerShell I create a folder called <code>CoreTesting</code>, navigate into it and launch VS Code with <code>code</code>.</p>
  
  <p>I hit <code>CTRL + `</code> to enter the terminal and navigate into the solution's folder.</p>
  
  <p>I then enter <code>dotnet new classlib --name Common</code>, see the new folder <code>Common</code> and enter <code>dotnet build .\Common\</code> to build the class library. All is well.</p>
  
  <p>I add the Common folder to VS Code and hit <code>CTRL + SHIFT + B</code> and see <code>No build task to run found. Configure Build Task...</code>, so I hit <code>return</code> and see <code>Create tasks.json file from template</code>, so I hit <code>return</code> again and see:</p>
  
  <ul>
  <li><code>MSBuild</code></li>
  <li><code>maven</code></li>
  <li><code>.NET Core</code></li>
  <li><code>Others</code></li>
  </ul>
  
  <p>So I select <code>.NET Core</code> and see that a <code>.vscode</code> folder is created containing <code>tasks.json</code>. This file contains:</p>
  
  <pre class="lang-js prettyprint-override"><code>{
      // See https://go.microsoft.com/fwlink/?LinkId=733558
      // for the documentation about the tasks.json format
      "version": "2.0.0",
      "tasks": [
          {
              "label": "build",
              "command": "dotnet build",
              "type": "shell",
              "group": "build",
              "presentation": {
                  "reveal": "silent"
              },
              "problemMatcher": "$msCompile"
          }
      ]
  }
  </code></pre>
  
  <p>I hit <code>CTRL + SHIFT + B</code> again and see the option <code>build Common</code>, so I hit <code>return</code> and see this:</p>
  
  <pre><code>&gt; Executing task in folder Common: dotnet build &lt;
  
  Microsoft (R) Build Engine version 16.0.225-preview+g5ebeba52a1 for .NET Core
  Copyright (C) Microsoft Corporation. All rights reserved.
  
  MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
  The terminal process terminated with exit code: 1
  
  Terminal will be reused by tasks, press any key to close it.
  </code></pre>
  
  <p>The structure I can see is this:</p>
  
  <ul>
  <li><code>Common\</code>
  
  <ul>
  <li><code>.vscode\</code>
  
  <ul>
  <li><code>tasks.json</code></li>
  </ul></li>
  <li><code>bin\</code></li>
  <li><code>obj\</code></li>
  <li><code>Class1.cs</code></li>
  <li><code>Common.csproj</code></li>
  </ul></li>
  </ul>
  
  <p>What have I done wrong?</p>