compiler error

6 posts / 0 new
Last post
Offline
Last seen: 1 day 18 hours ago
Joined: 09/23/2022
Posts: 3
compiler error

I am new to RTI/DDS.   I am using .Net.  I am able to download, build, and run the rticonnextdds-getting-started hello_world with Visual Studio 2022.   I have build some idl that has includes.  My rtiddsgen commands is this:

rtiddsgen -language c# -d generated -ppOption /nologo -ppOption /C -ppOption /E -ppOption /X -ppOption -C -ppPath "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe" *.idl

The *.idl is just to indicate all my idl files.   They rtiddsgen without error.  I get all the cs and Plugin.cs files I expect.  I drop those into the hello_world project, but then get this compilation error.

C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(75,5): error MSB6006: "csc.exe" exited with code -2146232797.

Any thoughts?  Do I need to install an older version of Visual Studio to use the cl.exe. 

 

Organization:
Howard's picture
Offline
Last seen: 1 day 18 hours ago
Joined: 11/29/2012
Posts: 429

I assume that you are using Connext 6.1.1?  From where are you getting the Connext libs supporting .NET?  Which version of the .NET framework are you using?

And where did you get a C# "hello_world" project?  Did you create that manually?

Offline
Last seen: 1 day 18 hours ago
Joined: 09/23/2022
Posts: 3

Yes, 6.1.1.  Nuget.org:

<PackageReference Include="Rti.ConnextDds" Version="6.1.1" />
<PackageReference Include="Rti.ConnextDds.Extra" Version="6.1.1" />
<PackageReference Include="Rti.ConnextDds.Native" Version="6.1.1" />

I have tried net5.0 and net6.0 with the same results.

I got the hello world from a link in the get started from rti website.

https://github.com/rticommunity/rticonnextdds-getting-started

 

Howard's picture
Offline
Last seen: 1 day 18 hours ago
Joined: 11/29/2012
Posts: 429

The github repository doesn't have project files for Visual Studio.  So, how did you get the project files?

Did you run

rtiddsgen -language c# -example net5 -d csharp -ppDisable hello_world.idl

If so, without modifying the project, did you get the vanilla "hello_world" example to compile and run in .NET5?

What is your idl file using #include to do?

Did you do anything else except add the generated .cs files to the project?

 

 

Offline
Last seen: 1 day 18 hours ago
Joined: 09/23/2022
Posts: 3

Yes I followed those instructions for rtiddsgen.  Yes the vanilla project compiled and ran.   I didn't do anything additional to the generated cs files; just changed the rtiddsgen arguments to support the include directives.   I have 73 files with 564 structures that I converted from another architecture we use.  I don't get any errors on the rtiddsgen. 

Howard's picture
Offline
Last seen: 1 day 18 hours ago
Joined: 11/29/2012
Posts: 429

What does your #includes do? 

In any case, looking up "MSB6006" on Google seems to indicate that this is an error with Visual Studio itself...

Can you try a different version of Visual Studio?