C++ - compile: error MSB4057: The target "Build" does not exist in the project.

2024-08-02T11:57:01.73+00:00

Trying to compile / build a C++ project, but keep on getting this error:

C++ - compile: error MSB4057: The target "Build" does not exist in the project.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,709 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
996 questions
{count} votes

Accepted answer
  1. Hui Liu-MSFT 48,521 Reputation points Microsoft Vendor
    2024-08-02T14:01:45.72+00:00

    Hi,@Pieter Claassens (ZA) (PC BP Product Engineering). Welcome to Microsoft Q&A.

    MSB4057: The target 'target name' does not exist in the project.

    This error occurs when a target cannot be found, but it is referenced in a project file (such as in CallTarget, BeforeTargets, AfterTargets, or DependsOnTarget). heck the spelling of the target and ensure that it's present in the project file or its imports. Check the logic of conditions to make sure that the target is included under the relevant conditions. If the target is an individual project build within a solution that is nested in a Visual Studio Solution folder and you're referencing it with the command-line option -targets or -t, make sure that the file containing the target is properly referenced by the solution folder name, not the name of the folder on disk.

    You can also refer to the thread MSBuild: error MSB4057: The target does not exist in the project to see if it helps you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. 2024-08-06T06:59:07.4933333+00:00

    Good morning - problem is now solved, thank you

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.