2. Create Visual Studio Project

The following guides will show you how to create a C#/C++ project so you can start using our motion controller API (RapidCode).

1. Start Visual Studio 2019 and select Create a new Project

3. On the new window, search for console app and select Console App (.NET Framework)

Make sure your application is using the .NET Framework and not the .NET Core Framework.

4. Specify the Name and Solution Name for your project, then hit OK.

Name: This will be the name given to your Namespace/Package/Project. The Project file contains all the information of a project/package/namespace, such as its settings and specially the .cs files (this are your C# applications) in the project.

For more: visit → https://msdn.microsoft.com/en-us/library/bb165067.aspx

Solution Name: This will be the name given to the container for the projects/packages/namespaces and the configurations the projects can build in. A solution is a structure for organizing projects in Visual Studio. The solution maintains the state information for projects in .sln (text-based, shared) and .suo (binary, user-specific solution options) files.

For more: visit → https://msdn.microsoft.com/en-us/library/bb165951.aspx

4.1 The new project will appear in the Solution Explorer:

5. If the Program.cs file is not open in the Code Editor, open the shortcut menu for Program.cs in Solution Explorer, and then choose View Code.

6. Replace the contents of Program.cs with the following code.

// A Hello World! program in C#.
using System;
namespace HelloWorld
{
    class Hello
    {
        static void Main()
        {
            // Print to console.
            Console.WriteLine("Hello World!");
            
            // Print to console.
            Console.WriteLine("Press any key to exit.");
            
            // Keep the console window open until a key is pressed.
            Console.ReadKey();
        }
    }
}

7. Choose the F5 key to run the project. A Command Prompt window appears that contains the line:

Hello World!

Last updated