How to build a simple HelloWorld C++ console application and execute it on an Azure node?

Kelly Zhao 65 Reputation points Microsoft Employee
2024-02-16T22:54:04.6966667+00:00

Hi I would like to build a simple HelloWorld C++ console application in Visual Studio and execute it on an Azure node.

  • Project Setup: I built the project in Visual Studio following the instructions provided in this documentation. I specifically aimed for a 64-bit debug build.
  • Error Message: Upon execution on the Azure node, I received the following error: CppHelloWorld.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
  • Environment Information: The Azure node's OS is Microsoft Windows Server 2022 Azure.

Here is the vcxproj file of the project CppHelloWorld.vcxproj.txt.

I'd appreciate any insights into why the version compatibility issue is occurring and how I can resolve it.

Thank you for your assistance!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,092 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,584 questions
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,519 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
960 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Kelly Zhao 65 Reputation points Microsoft Employee
    2024-02-17T00:41:30.7666667+00:00

    Ah, this question can be ignored :) I don't really understand the cause, but I found a package under "MyProject\x64\Debug" and it works fine on nodes.

    0 comments No comments

  2. KarishmaTiwari-MSFT 18,352 Reputation points Microsoft Employee
    2024-02-28T17:58:07.7266667+00:00

    @Kelly Zhao I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer. Accepted answers show up at the top, resulting in improved discoverability for others.

    Issue: How to build a simple HelloWorld C++ console application and execute it on an Azure node?

    Solution: Customer shared - "I found a package under "MyProject\x64\Debug" and it works fine on nodes."


    If your issue remains unresolved or have further questions, please let us know in the comments how we can assist. We are here to help you and strive to make your experience better and greatly value your feedback. User's image

    0 comments No comments