How to build, deploy and run a Xamarin forms GTK application on a Raspberry Pi using Visual Studio 2019 - xamarin.forms

I have a situation where I need to develop a multi-platform app to run on windows and Raspbian (Raspberry PI OS). Currently, I have an application written in Xamarin Forms WPF for windows and one written in Xamarin Forms GTK for use on the RPI. The issue I am having is, when I deploy the GTK version, I get one of two exception:
Development System:
Visual Studio 2019 on Windows 10 Pro
Framework 4.7.2 and .Net Standard 2.0
Target Systems
Windows 10 (Xamarin.Forms.WPF)
Debian 10 "Buster" (Xamarin.Forms.GTK)
System.DllNotFoundException: libglib-2.0-0.dll : When trying to run with Mono
The library 'libhostpolicy.so' required to execute the application was not found. : When trying to run under dotnet.
The RPI is running Debian 10 "Buster". The OS is up to date and dotnet, mono and GTK have been installed successfully. A simple "Hello World!" console app was build on windows using Visual Studio and executed against both frameworks without issue on the RPI. However, any real app with UI fails with the above exceptions.
Can anyone please provide me with information or point me in the right direction on how to resolve these issues in detail? Most of the information on the web is partial and/or makes assumptions about subject matter knowledge. Which is not really helpful.
I've researched and followed many examples online. However, they either did not work as expected or did not cover the subject of deployment to the RPI (Raspberry Pi). The system has the required frameworks and tools on it. It appears there application is missing configuration files.

Related

It is possible to debug an asp.net WebForms application on MacOS using Visual Studio 2022?

Current scenario is that I have this macos laptop (Apple M1 Pro processor) in which I was working for the last 8 months on react under visual studio code. Now, in a new project I need to leverage some API's and a lot of JSON responses and I wanted to debug the code but I saw that it is just not possible. I came across this old article ASP.NET Mono Setup
but I still feel that I won't be able to have the same level of developing experience like in a windows machine.
So, question is, can I (and if the answer if yes) debug an asp.net webforms app on visual studio 2022 for mac? If not, I would need to ask for a laptop replacement.
Thanks in advance!
Only the .net core runtimes are platform neutral.
But, the .net 2-4.8 runtimes are not.
One MIGHT be able to play and mess around with mono, but at the end of the day, I suggest you go with a VM (virtual machine),and run windows.
In other words, you don't need a new laptop, but just use a VM and install windows on that VM.

A deployment error in Xamarin.Forms UWP when deploying from a PC to itself

When I just installed a Visual Studio 2017 and created my Xamarin.Forms application, it ran fine on my Windows 10 PC. However, I then installed some apps from Steam (which is the only thing I can think of that could change system settings). After that, when I try to create another Xamarin.Forms project, it does not deploy well to my machine and gives the following error:
DEP6200: Bootstrapping failed. Device cannot be found.
SmartDeviceException - Deployment failed because no
device was detected. Make sure a device is connected
and powered on. [0x80131500]
Strangely enough, my first app continues to build and run fine, even if I uninstall it from Windows and then deploy it again.
What could be the issue?
I have just noticed that Visual Studio makes ARM the default architecture. Changing it to "Any CPU" brought back the option to run the app on my machine.

Install UWP package on Windows 8.1 Pro without developers license

With Xamarin.Forms I'm developing a mobile app. In Android I get this succesfully running on a device. I succeeded to create an app package from the UWP project and install it on my own Windows 10 PC. This is also my developing machine, so it's in Developer Mode by default. So it runs here without any problems.
My purpose is to get it running on Windows 8.1 Pro (tablet size). It just needs to consume the app. When installing the app by using the script, it's throwing the error that no developers license is found. On this device I didn't found anything to put it in Developers Mode, but it seems me that this is not needed, because it only consuming the app and no developing will take place on it.
It's is an internal app, so no need to place it on the Windows Store.
So my exact question: how can I install this app on this device without setting everything up for a Developer?
The answer would be no. Windows 10 has more new API and concepts that are not available on Windows 8.1. UWP app will not backward compatible to Windows 8.1. But WRT app will be Upward compatible to windows 10. It means that the windows 8 store app could run in windows 10. for more please refer Move from Windows Runtime 8.x to UWP.

Windows App Certification Kit "The selection criteria did not match any tests"

I am preparing my app for upload to the MS Store and am running into problems with the Windows App Certification Kit. Nearly every test performed by the kit produces the exact same FAILED test result as follows:
"The selection criteria did not match any tests.
No test cases were executed."
My app is a Windows Forms app that was packaged using the "Windows Application Packaging Project" in Visual Studio 2017 (i.e. using the latest iteration of the MS "Desktop Bridge").
I should also add that I was able to successfully install the app bundle (.appxbundle) by loading the temporary cert and double clicking on the appxbundle so I know the UWP install works perfectly.
Any ideas on how to fix issue?
Thanks!
I found the solution to my problem! It appeared to me based upon the test result text that the Windows App Certification Kit was simply failing to run any tests at all...so I decided to uninstall then reinstall the Windows Software Development Kit (which includes the Windows App Cert Kit among other things). After reinstall the Windows App Cert Kit ran correctly!...AND MY APP PASSED EVERY SINGLE TEST!!! YES!!!
Anyhow, if you experience the same problem as me, you now have the solution to your issue...uninstall then reinstall the Windows Software Development Kit.

Is it possible to develop ASP.NET MVC applications in Visual Studio for Mac?

Since I am planning to buy a new MacBook Pro (2017) and currently working on a Windows 10-device on a ASP.NET MVC (Not ASP.NET Core MVC) project for my internship, I was wondering if it is possible to continue developing the same project in Visual Studio for Mac.
To put it in other words: Is it possible to develop ASP.NET MVC applications in Visual Studio for Mac?
I tried to Google this, but I could only find ASP.NET Core MVC projects being discussed for VS for Mac. The current project is NOT a Core project, but just an ASP.NET project.
I really don't want to install Windows either on my MacBook Pro or on an external drive.
As you've correctly surmised, it's not possible to build ASP.NET MVC projects on the Mac that aren't based on .NET Core or Mono. So if your project is currently targetting ASP.NET on .NET Framework 4.x, the you'll either have to stay on Windows:
Use Bootcamp to run Windows on your Mac
Use a Virtual Machine to run Windows inside Mac
Use Parallels Desktop or VMWare Fusion to run windows applications inside your Mac
Or you can convert your application over to Mono or .NET Core, depending on your dependencies that may be relatively easy, or very hard or anywhere in between.
You could also decide to use Visual Studio Team Services to build your code on a Windows Hosted agent and edit the sources on yoru mac, you'd have to forego the ability to compile or run your code locally.
You can also decide to "rent" a virtual machine in Azure (maybe your have MSDN credits you could use for this purpose?) and remote desktop to that machine to work on your project.

Resources