GithubHelp home page GithubHelp logo

flouren / dotnet7pi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pjgpetecodes/dotnet7pi

0.0 0.0 0.0 7.02 MB

Install .NET 7 on a Raspberry Pi with a single line.

License: MIT License

Shell 8.88% JavaScript 0.17% C# 40.35% CSS 4.36% HTML 6.89% Batchfile 39.35%

dotnet7pi's Introduction

Dot Net 7 with the Raspberry Pi

This is the source code to accompany my talk on Microsoft .NET 7 with the Raspberry Pi.

Talk details, slides and a blog are incoming!

Tested on a Raspberry Pi 3B+ / Raspberry Pi Zero 2W and a Raspberry Pi 4

Any Queries, contact me at;

https://www.petecodes.co.uk/contact/

Pete Gallagher / Pete Codes / PJG Creations 2022

Blog Post

You can read the accompanying blog post for this repository here;

Install and use .NET 7 with the Raspberry Pi

.NET 7 Installation on a Raspberry Pi

You can install Dot Net 7 on the Raspberry Pi in one command by executing;

wget -O - https://raw.githubusercontent.com/pjgpetecodes/dotnet7pi/master/install.sh | sudo bash

You can see a run through of the installation here;

Image

Local Install Script

If you've cloned this repo, you can install Dot Net 7 by running the following in the root of the repo;

sudo chmod +x install.sh
sudo ./install.sh 

PC Setup

Download the latest version of the .NET framework for your system from here;

https://dotnet.microsoft.com/download/dotnet/7.0

Other Devices

ODroid HC4

This script has been tentatively tested on an ODroid HC4, which has an ARM Cortex A55 which is an ARMv8 Processor. The script installs correctly, however the GPIO functionality hasn't been tested yet.

The .NET GPIO Nuget Package supports the Odroid Devices according to the documentation, so it should be fine to use.

If you have one of these devices and get it working, do get in touch by tweeting me @pete_codes!

Remote Deployment and Debugging

If you'd like to be able to write code on your PC and then Deploy and Debug that code directly on a Raspberry Pi, then I've create a one line script to set that up;

curl --output remotedebugsetup.bat https://raw.githubusercontent.com/pjgpetecodes/dotnet7pi/master/remotedebugsetup.bat && remotedebugsetup.bat

You can read more about this in a blog post here;

http://bit.ly/piremotedeployanddebug

Setup PC for Remote Deployment and Debugging an Uno Application

If you'd like to be able to Create an Uno Platform Application on your PC and then Deploy and Debug that code directly on a Raspberry Pi, then I've create a one line script to set that up;

curl --output remotedebugsetup_uno.bat https://raw.githubusercontent.com/pjgpetecodes/dotnet7pi/master/remotedebugsetup_uno.bat && remotedebugsetup_uno.bat

You can read more about this in a blog post here;

http://bit.ly/piremotedeployanddebuguno

IoT Hub Connection

The 3 IoT Hub Based Examples will require an IoT Hub Device Primary Connection String to work.

Deploying from VS Code on Windows

If you want to Deploy from VSCode on a Windows PC, then modify the RaspberryDeployWSL task's rsync command in the .vscode/tasks.json files in the various projects to point to your Pi IP Address;

"'sshpass -p \"raspberry\" rsync -rvuz $(wslpath '\"'${workspaceFolder}'\"')/bin/linux-arm/publish/ pi@[Enter Your IP Address]:share/${workspaceFolderBasename}/'"

Replace the [Enter Your IP Address] Section with the IP Address of your Pi (No Square Brackets!).

You will also need to change the username (pi@) and password (-p \"raspberry") if you have altered those too.

Debugging from VS Code on Windows

If you want to Debug from VSCode on a Windows PC, then modify the .NET Core Launch Console task in the .vscode/launch.json files in the various projects to point to your Pi's Hostname;

"pipeArgs": [
    "-pw",
    "raspberry",
    "root@[Your Pi Hostname].local"
],

You'll also need to install the VS Debugger;

curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -r linux-arm -v latest -l ~/vsdbg

You may also need to install curl and zip if they're not already installed;

sudo apt-get install curl

dotnet7pi's People

Contributors

pjgpetecodes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.