Running VB.NET script with mono on a raspberry pi

吃可爱长大的小学妹 提交于 2021-01-28 14:30:09

问题


I am trying to run a vb.net script using mono on the latest version of raspbian. The script was originally written in visual studio and i just downloaded the entire folder on to my raspberry pi 3 from dropbox and tried to run the .exe file.

mono /home/pi/Downloads/ctof/bin/Debug/ctof.exe

And got met with:

Unhandled Exception:
    System.IO.FileNotFoundException: Could not load file or assembly 
    'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
    File name: 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
    [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
    File name: 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

does anyone have any suggestions?


回答1:


Use these codes and check. Worked for me :D

http://www.mono-project.com/download/stable/#download-lin-raspbian

(I used Raspbian- check under linux tab, then raspbian tab, Raspbian 9(for Stretch) or Raspbian 8 (for Jessie))

Raspbian 9 (armhf)

sudo apt install apt-transport-https dirmngr

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

echo "deb https://download.mono-project.com/repo/debian stable-raspbianstretch main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

sudo apt update

Raspbian 8 (armhf)

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

sudo apt install apt-transport-https

echo "deb https://download.mono-project.com/repo/debian stable-raspbianjessie main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

sudo apt update

use line by line

and then install mono

sudo apt install mono-devel

and finally for vb use this

sudo apt-get install mono-vbnc

for more info https://www.raspberrypi.org/forums/viewtopic.php?t=6715

Good luck mate :)



来源:https://stackoverflow.com/questions/47718574/running-vb-net-script-with-mono-on-a-raspberry-pi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!