Here we are continuing the experiments with Raspberry Pi 4. As a .Net developer, what is the meaning if we cannot install .Net into RasPi and run one program?
Please note this post is aiming at installing the .Net runtime, not the SDK. Development and compilation will be done outside of RasPi. Also, this is not aiming to run ASP.Net, just simple .Net console apps only.
Do we really need to install .Net runtime to RasPi?
- Publish with the 'linux-arm' option.
- Copy the folder to RasPi
- Give execute permission
- Run the app
Attempt 1 - Install the apt-get way
The screenshot is given below
Let us do the next attempt.
Attempt 2 - Install using the scripts
This time let's follow the Microsoft link as is https://docs.microsoft.com/en-us/dotnet/iot/deployment. I run the first command and below goes the output.
Wow. It installed the SDK. The above link is not at all talking anything about SDK. It's just talking about deploying the framework-dependent applications only. Let us check what is installed
Microsoft is great. We just asked .Net runtime. But we got SDK and ASPNetCore runtime as well. Now our RasPi is a full-fledged web server.
Once we have the installation ready. Get the published application. Make sure published as Framework-dependent and Target runtime set to Portable. Then run the normal command as below
dotnet "app.dll"
Closing thoughts
Happy IoTing.
No comments:
Post a Comment