dotnet / dotnet/msbuild

Can not build the `build` target of a specific project within a solution

Open
#5,722 12 comments 5 reactions 0 assignees View on GitHub
Area: Solution (.sln) bug triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### Issue Description
I'm following the guide from https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-build-specific-targets-in-solutions-by-using-msbuild-exe
Some targets cannot be run from the solution level using msbuid .sln -t::

### Reproduce
For example,`msbuild Consoleapp.sln -t:ConsoleApp:build` gives me
>error MSB4057: The target "ConsoleApp:build" does not exist in the project.

However, rebuild and clean seems to be working.

### Analysis

I've checked .sln.metaproj. There are only ConsoleApp.Clean, Console:Public and Console:Rebuild created. No build or custom target.

### Versions & Configurations
Microsoft (R) Build Engine version 16.7.0+b89cb5fde for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

16.7.0.37604

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.