Hi, I found this description below in the PLCnext community but I have some trouble to get this run. If I insert the command ‘dotnet --info’ then it seems that my setup is not correct. Result ‘command not found’ How to use the .Net Core on a PLCnext Control If you’re a C# programmer working with a PLCnext Control then you might want to use the Microsoft ® .NET Core runtime. Here’s how to install it on an AXC F 2152 control. Set up the runtime on the PLC
1. Download the Dotnetcore Runtime Binaries - [Microsoft .NET Core download site](https://www.microsoft.com/net/download/dotnet-core/2.1) \- for the AXC F 2152 it is `Linux ARM 32bit`. **Note:** You may also use a newer version, e.g. [3.0](en/hn-makers-blog/424-install-the-net-core-runtime-3-0-0-on-the-axc-f-2152.html)
2. Unzip the Runtime .zip file
3. Unzip the `Data` folder
4. Copy the unzipped files (host, shared and dotnet binary) to the controller at `/opt/DotnetRT`
5. Create a symlink to the binary (as root user) `ln -s /opt/DotnetRT/dotnet /usr/local/bin/dotnet`
6. Check if the link is setup correctly: `lrwxrwxrwx 1 admin plcnext 20 Nov 27 12:50 dotnet -> /opt/DotnetRT/dotnet`
7. Check if installation was succesfull: `dotnet --info`
Do you have an idea, what I need to do? Thanks. Alex
Hi Alex, Is there an executable named dotnet in the directory /opt/DotnetRT/ ? Does this have execute privileges? What happens when you run the command /opt/DotnetRT/dotnet --info ? Is there a symbolic link named dotnet in the directory /usr/local/bin/ ? Is this symbolic link pointing to the dotnet executable in the directory /opt/DotnetRT/ ? Hopefully one of these checks will reveal the problem. Regards,
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from: https://aka.ms/dotnet-download Host (useful for support):
Version: 3.0.0
Commit: 95a0a61858 .NET Core SDKs installed:
No SDKs were found. .NET Core runtimes installed:
Microsoft.NETCore.App 3.0.0 [/opt/dotnet-runtime-3.0.0-linux-arm/shared/Microsoft.NETCore.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download Now I will check, if I can work with TCPIP Socket (c#) on my PLCnext device Thanks a lot. Alex
the thing with Linux File Systems is that they are not supported by Windows so the moment you unzip it on a Windows OS lots of Linux file information go missing.
like the permissions , Exectuion property or Symlinks.
So after copying you need to restore those or unzip directly on the PLC. chmod +x File → to make it executeabled.
ln -s to restore symlinks…
You do not need the SDK on the PLC.
It also takes way to long to compile on target.
For running code the runtime is enough…
So I recommend you downloading the sdk to your PC only and set in the project properties that you are building for Arm32 Bit. kind regards,
Oliver Warneke