Can I use Visual Studio Express to build RTI Connext applications?

Note: Applies to RTI Data Distribution Service 4.1 and higher and all RTI Connext versions.

You may want to use Visual Studio Express because it's free. Please note, however, that Visual Studio Express has some limitations: 

  • It does not include Microsoft programming libraries, such as MFC, ATL, and WTL. 
  • Third-party tools (such as Visual Assist) and extra free tools from Microsoft may not work with it. 
  • You cannot use Visual Studio Express to build applications for Windows CE or 64-bit systems. 
  • The i86Win32VS2005 architecture is not compatible with Visual C++ 2008 Express, Windows SDK for Windows Server 2008, or .NET Framework 3.5.
  • Visual C# Express cannot directly include rtiddsgen-generated support code—see below for workaround.

If you think Visual Studio Express will meet your needs, here is how to get it to work:

  1. Make sure you have Visual Studio Express Service Pack 1 installed.
  2. Download and install the Platform SDK [*], which contains some additional DLLs that you will need. From Microsoft's main download page (, search for Windows Server 2003 R2 Platform SDK.
  3. Set up Visual Studio Express so it can find RTI's libraries and header files.
  4. Edit the solution file to remove unnecessary libraries.

If you have problems getting Visual Studio Express to work, and you have already read the RTI Core Libraries and Utilities Getting Started Guide and Microsoft's instructions, see if your issues match up with one of the following:

  1. When launching Visual C++, a window appears stating that it cannot locate Mspdb80.dll

    Solution: Add C:\Program Files\Microsoft Visual Studio 8\Common7\IDE to your path.

  2. When building, you encounter the following error:
    C:\rti\ndds.4.2e\include\ndds\osapi\osapi_socket.h(33): fatal error C1083: Cannot open include file: 'winsock2.h': No such file or directory

    Install Microsoft Windows Server 2003 R2 Platform SDK (do not install a newer version).
  3. When building the example HelloWorld application, you see this fatal error:
    myhello\HelloWorld.c : fatal error C1083: Cannot open compiler generated file: '.\objs\i86Win32VS2005\HelloWorld.obj': Permission denied"
    or another similar error.

    Solution: This is due to the fact that the example code creates projects that have several source files are in both projects. Visual Studio enables parallel project builds so the compiler can experience a condition where the output (object) file is locked by another instance of the compiler.  You should not see this in real world projects as you would put the common rtiddsgen generated code in a library. There are several solutions to this problem. The easiset is to simply build again. Other options are to set parallel builds to one or make one project dependent on the other.
  4. When compiling you get errors that read
    error C2071: '_TP_CALLBACK_ENVIRON::<unnamed-tag>::<alignment member>' : illegal storage class
    Issue: The issue occurs when the 2008 VS SDK is installed instead of the 2005 SDK or is the 2008 SDK was previously installed and not uninstall it before installing the 2005 SDK

    Workaround: In nlog_makeheader.h file Private is defined as static, which conflicts with winnt.h Private. Do not define it as static. Otherwise, uninstalling 2008 VS SDK and reinstalling the 2005 SDK will fix the problem. 

Building C# Projects with Visual Studio 2005 Express

Because Visual Studio Express doesn't fully support mixed C# and C++/CLI projects, there are some extra steps when using RTI with C# bindings.

  1. Generate code:
    rtiddsgen -language c# -example i86Win32dotnet2.0 Hello.idl
  2. Open Hello_type-dotnet2.0.vcproj in Visual C++ Express. Warnings about applications for projects Hello_publisher.csproj and Hello_subscriber.csproj are expected and benign. Choose Debug vs. Release and build the Hello_type project.

  3. Open Hello-csharp.sln in Visual C# Express (the warning about project Hello_type-dotnet2.0.vcproj is similarly benign). Under References for both the publisher and subscriber, right-click the existing Hello_type reference and remove it. Right-click References to Add a Reference. In the new dialog, select the Browse tab, then find Hello_type.dll from either the Debug or Release directory. The project should build now.

Building C# Projects with Visual Studio 2010 Express 

  1. Generate Code:
    rtiddsgen -language c# -example i86Win32dotnet4.0 Hello.idl
  2. Open Hello_example-csharp.sln in Visual C++ 2010 Express. You will be presented with two error dialogues explaining that the project type (.csproj) is not supported by Visual C++ 2010 Express. Click OK. 

  3. Right-click on the Hello_type project and select Build.

  4. Open either the Hello_publisher-csharp.csproj or Hello_subscriber-csharp.csproj project in Visual C# 2010 Express. You will be presented with an error dialogue explaining that the project type (.vcxproj) is not supported. Click OK. 
  5. If you have undefined reference warnings for Hello_type:
    Under the References folder in both the publisher and subscriber projects Right-click on Hello_type and select Remove. Then Right-click on References and select Add Reference. Go to the Browse tab and go to bin>Debug-VS2010 and add Hello_type.dll back to the Reference folder in each project. 

  6. Build both of the projects.

  7. Run the projects from the bin>Debug-VS2010 directories, as these directories contain libraries that must be in the execution directory. 

Note: there are certain requirements for using the .NET API. You must have both the correct .NET Framework Version installed as well as the correct Visual C++ Redistributable Package installed. For a more detailed explanation of the requirements please see the "What are the requirements for using the .NET API?" solution in our Public Knowledge Database.

Programming Language: