I have installed Raspbian and mono on my raspberry pi 2 model B following this tutorial:
http://j.tlns.be/2015/02/04/getting-started-with-the-raspberry-pi-2-for-net-developers/

Then I have created a new project on Visual Studio Community 2015 on my Windows 10 PC: ASP.NET Web Application (Visual C#) using the ASP.NET 4.5.2 Templace MVC.

Then I do the following changes:
- Target Framework is ".NET Framework 4.5.1" (default was 4.5.2).
- Output type is "console application" (to get a .exe and not just dll)

When building it on Visual Studio, I only get a myapp.vshost.exe (and a lot of dll files). I copy all the /bin content to the raspberry pi and type:

mono myapp.vshost.exe

And then I get this:

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

I have tried changing the platform target from "any CPU" to "x86" but it doesn't solve the issue.

Can you help please?

Related posts

Recent Viewed