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

Discus and support C++ - compile: error MSB4057: The target "Build" does not exist in the project. in Windows 10 Gaming to solve the problem; Trying to Build a C++ project --> Get this error: error MSB4057: The target "Build" does not exist in the project.Any ideas perhaps ?... Discussion in 'Windows 10 Gaming' started by Pieter Claassens ZA PC, Aug 2, 2024.

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


    Trying to Build a C++ project --> Get this error: error MSB4057: The target "Build" does not exist in the project.Any ideas perhaps ?

    :)
     
    Pieter Claassens ZA PC, Aug 2, 2024
    #1

  2. How to avoid the MPLAB X IDE v5.10 behavior of build errors whenever a user clones the project Github Repository

    I am asking how to correct the unexpected behavior of MPLABX IDE v5.10, detailed below. The end goal of this would be to successfully build the code project in MPLABX by understanding what could be causing the unexpected build errors.

    MPLABX IDE v5.10 does not produce build errors on the source computer running Windows 10 that pushed the local code to the repository SWIM-team-junior-project. Any other computer that clones the repository using Git Command Line tool in PowerShell on Windows 10, will show build errors.

    To see the repository issue with the Makefile output see the link SWIM team project Github Issue

    To reproduce the entire (quite lengthy) process, the steps below show how to do so:


    Followed by creating a new MPLABX project, with the following settings:

    • Microchip Embedded -> Standalone Project
    • Select Device -> PIC32MZ2048EFG144
    • Select Tool (Optional) -> Simulator
    • Select Compiler -> XC32 (v2.15) [C:\Program Files (x86)\Microchip\xc32\v2.15\bin]
    • Select Project Name and Folder -> "practice_master_clone_a"

    And in the GUI for MPLABX IDE the following screenshots and captions describe the steps used to reference the cloned repository code files into the MPLABX IDE project named "practice_master_clone_a". Note that the integrated Git tool in MPLABX IDE is not being used. The Git command line tool is being used in PowerShell.


    Lastly, enter "Project Properties" in the dialogue window showing from right-clicking on the name of the project in the Navigator window, shown in the image below:

    • Project Properties
    • Followed by changing to "Categories:" -> "Conf: [default] -> XC32 (Global Options) -> xc32-ld
    • Then change the Heap size (bytes) and Minimum stack size (bytes) both to 2048 as shown highlighted in red in the screenshot below:
    • Project Properties Categories

    Following all of the above steps results in a "BUILD FAILED", the output of which is included at the very bottom of this post. However, the build is successful for the source machine that pushes the original MPLABX IDE project to the github repository.
     
    Peter Stine, Aug 2, 2024
    #2
  3. How to build a .waproj MSIX project using msbuild (from build tools)

    I am trying to work out how to build my .waproj project, and builds a bundle for a WINUI3 project from the command line (for a teamcity auto CLI build system)

    I have installed VS 2022 build tools (C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin), and am trying to build the .waproj file using the full path to msbuild (to make sure I get the correct version), eg

    ```

    "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\msbuild" "TestAppWinUI (Package).wapproj" /p:UapAppxPackageBuildMode=SideLoadOnly /p:AppxBundle=Never /p:AppxPackageOutput=d:\\0\\MsixDesktopApp.msix /p:AppxPackageSigningEnabled=false

    ```

    But I get the following errors

    ```

    Build started 14-Jun-22 11:05:23 AM.

    Project "D:\dev\TestApps\TestApp\TestAppWinUI\TestAppWinUI (Package)\TestAppWinUI (Package).wapproj" on node 1 (default targets).

    D:\dev\TestApps\TestApp\TestAppWinUI\TestAppWinUI (Package)\TestAppWinUI (Package).wapproj(36,3): error MSB4019: The imported project "C:\Program Files (x86)\Microsoft

    Visual Studio\2022\BuildTools\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Micr

    osoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\DesktopBridge\\Microsoft.DesktopBridge.props" is correct, and that the file exists on disk.

    Done Building Project "D:\dev\TestApps\TestApp\TestAppWinUI\TestAppWinUI (Package)\TestAppWinUI (Package).wapproj" (default targets) -- FAILED.





    Build FAILED.



    "D:\dev\TestApps\TestApp\TestAppWinUI\TestAppWinUI (Package)\TestAppWinUI (Package).wapproj" (default target) (1) ->

    D:\dev\TestApps\TestApp\TestAppWinUI\TestAppWinUI (Package)\TestAppWinUI (Package).wapproj(36,3): error MSB4019: The imported project "C:\Program Files (x86)\Microso

    ft Visual Studio\2022\BuildTools\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files (x86)\Mi

    crosoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\DesktopBridge\\Microsoft.DesktopBridge.props" is correct, and that the file exists on disk.



    0 Warning(s)

    1 Error(s)



    Time Elapsed 00:00:00.01

    ```

    Would anyone know how I can fix this?

    Thanks in advance
     
    Peterjc2007, Aug 2, 2024
    #3
  4. jcaron Win User

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

    Compiling C files on Ubuntu and using the executable on Windows

    This is called cross-compiling. You need a "toolchain" (compiler, linker, etc.) that will generate the appropriate code and format, involving:

    • The target processor architecture. In your case is is probably the same (x86 or amd64), but sometimes you cross-compile for a different processor, for instance when you build an executable for an ARM processor on your PC.
    • The target ABI (those are the call conventions used).
    • The right format
    • The right libraries, including system libraries.

    Depending on the project, this may be very easy (just a flag or an environment variable to set somewhere) or very difficult.

    You'll find a few pointers here, here or here.
     
    jcaron, Aug 2, 2024
    #4
Thema:

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

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

  2. Drive C: does not exist

    in Windows 10 Gaming
    Drive C: does not exist: I restarted my PC into safe mode and when is started it went straight to startup repair, I've tried a few cmd and startup repair fixes but none of them work and I get a "drive c: does not exist" error...
  3. Drive C: does not exist

    in Windows 10 Software and Apps
    Drive C: does not exist: I restarted my PC into safe mode and when is started it went straight to startup repair, I've tried a few cmd and startup repair fixes but none of them work and I get a "drive c: does not exist" error...
  4. Windows Form Project c#, checking if Key exist in Registry

    in Windows 10 Gaming
    Windows Form Project c#, checking if Key exist in Registry: Hi, I tried various things does not seem to work if key does not exist it gives exceptional error, but if it does it works.Here Code:private void Form1_Loadobject sender, EventArgs e{ RegistryKey Key = Registry.CurrentUser.OpenSubKey@"SOFTWARE\MyApp\" ; if Key ==...
  5. Windows Form Project c#, checking if Key exist in Registry

    in Windows 10 Software and Apps
    Windows Form Project c#, checking if Key exist in Registry: Hi, I tried various things does not seem to work if key does not exist it gives exceptional error, but if it does it works.Here Code:private void Form1_Loadobject sender, EventArgs e{ RegistryKey Key = Registry.CurrentUser.OpenSubKey@"SOFTWARE\MyApp\" ; if Key ==...
  6. C++ - compile: error MSB4057: The target "Build" does not exist in the project.

    in Windows 10 Software and Apps
    C++ - compile: error MSB4057: The target "Build" does not exist in the project.: Trying to Build a C++ project --> Get this error: error MSB4057: The target "Build" does not exist in the project.Any ideas perhaps ? https://answers.microsoft.com/en-us/windows/forum/all/c-compile-error-msb4057-the-target-build-does-not/ab5e5d22-064c-4345-8f26-25bc14342b69
  7. C++ - compile: error MSB4057: The target "Build" does not exist in the project.

    in Windows 10 Customization
    C++ - compile: error MSB4057: The target "Build" does not exist in the project.: Trying to Build a C++ project --> Get this error: error MSB4057: The target "Build" does not exist in the project.Any ideas perhaps ? https://answers.microsoft.com/en-us/windows/forum/all/c-compile-error-msb4057-the-target-build-does-not/ab5e5d22-064c-4345-8f26-25bc14342b69
  8. Compile C to HEX

    in Windows 10 Software and Apps
    Compile C to HEX: Hi, I program in Oshonsoft BASIC, and have some C CODE that may work if I can get the HEX from it. How can I compile it please? Camerart.
  9. Microsoft account does not exist error - but it does exist...

    in Windows 10 Software and Apps
    Microsoft account does not exist error - but it does exist...: I have had a Microsoft account problem notification that has persisted for years and I’ve managed to ignore it for the most part.Here's a rundown of my confusion:Clicking on the problem notification when it either pops up or in the notification center in the bottom right of...
  10. priviledges and compiling c++

    in User Accounts and Family Safety
    priviledges and compiling c++: Hi all, I'm trying to code some basic c++ on ATOM IDE. I downloaded the MINGW c++ compiler and it has installed properly (I think) and I've added it to my variable path. I'm trying to run a "Hello World!" example, but my cmd line errors and and says, "ACCESS DENIED." I have...