Skip to content

[VSCode Extension] msbuild cannot find target "Build" for command "Build Project" #1537

Open
@MexHigh

Description

@MexHigh

Tool

Visual Studio Code extension

Description

I'm trying to build the sample Blinky Project. However, this happens with all projects (even newly created ones).

When running the "nanoFramework: Build Project" command, it fails with the following error:

nuget restore "/home/leon/Code/Samples/samples/Blinky/Blinky.sln" && msbuild "/home/leon/Code/Samples/samples/Blinky/Blinky.sln" -p:platform="Any CPU" -p:NanoFrameworkProjectSystemPath=/home/leon/.vscode/extensions/nanoframework.vscode-n
anoframework-1.0.181/dist/utils/nanoFramework/v1.0/ -verbosity:minimal
Automatische MSBuild-Erkennung: Die MSBuild-Version „15.0“ aus „/usr/lib/mono/msbuild/15.0/bin“ wird verwendet.
Alle in "packages.config" aufgeführten Pakete sind bereits installiert.
Microsoft (R)-Build-Engine, Version 16.10.1 für Mono
Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten.

/home/leon/Code/Samples/samples/Blinky/Blinky/Blinky.nfproj : error MSB4057: Das Ziel "Build" ist im Projekt nicht vorhanden.

So basicly, msbuild (mono) cannot find the "Build" target, and it is indeed not there. I don't know how to add this manually.

The Build target is also missing from newly created solutions/projects with the nanoFramework extension.

Additional info:

How to reproduce

  1. Open empty folder with vscode
  2. Run command "nanoFramework: Create New Solution" and follow instructions
  3. Run command "nanoFramework: Add a Project to existing Solution" and follow instructions
  4. Run command "nanoFramework: Build Project" --> fails

Expected behaviour

Build is successfull.

Screenshots

Command and its output:

image

Hanging "Flash device" command (may be relevant):

image

Aditional context

VS Code Version: 1.92.2
OS: Manjaro Linux
Arch: x64
Nanoframework Extension Version: v1.0.181
Nanoff --version: nanoff 2.5.90+c66e018c48
msbuild --version: 16.10.1.36201

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions