C# Connector building error

5 posts / 0 new
Last post
Offline
Last seen: 4 years 4 months ago
Joined: 11/24/2019
Posts: 11
C# Connector building error


Hello everyone,

I'm trying to use the C# Connector for Unity3D. I clone the rticonnextdds-connector-cs repository to my computer as stated in the documentation.

But when I try to compile the build.ps1 script via powershell, I get the following error:

MSBUILD : error MSB1001: Unknown switch.
Switch: /warnaserror

For switch syntax, type "MSBuild /help"
An error occurred when executing task 'Build-API'.
Error: One or more errors occurred.
MSBuild: Process returned an error (exit code 1).

How can I fix this error?

Offline
Last seen: 1 week 3 days ago
Joined: 04/02/2013
Posts: 196

It looks like the build script hasn't been updated for a while and it has some issue building on Windows.

 

I recommend that you try this:

 

cd src/Connector

dotnet build -f netstandard1.1

That will build the Dll. Add -c Release to build the release library.

(You'll need to install .NET Core if you don't have it already)

Offline
Last seen: 4 years 4 months ago
Joined: 11/24/2019
Posts: 11


I tried to build with the command "dotnet build -f netstandard1.1" 

but now I get the More than one build script specifiederror.

The .NET Core version 1.1 and version 3.1 are already installed. I tried the build process separately with both, but the result does not change. 

 

Offline
Last seen: 1 week 3 days ago
Joined: 04/02/2013
Posts: 196

That looks like an error from Cake, not from dotnet. Did you get that error from the command `dotnet build -f netstandard1.1` from the  folder src/Connector?

Offline
Last seen: 4 years 4 months ago
Joined: 11/24/2019
Posts: 11


Sorry my fault. I ran the dotnet build -f netstandard1.1 command in the wrong directory. 

I tried again in the correct directory and connector was built without errors. (with .NET Core version 3.1)

Thanks.