The Issue:
Our application is a .NET 5 Windows Desktop application. The licensing capability requires the application to use the System.Management component from NuGet to create a unique device ID from the system processor ID, MAC Address and BIOS serial number.
This all worked great when testing it from Visual Studio debugger. However, when adding System.Management.dll to the application installer (InstallShield installer) I naturally selected the version of System.Management.dll that was in the app's build target folder. It turns out that the version of the DLL that ends up in that folder is a no-op version that throws not supported exceptions saying "System.Management is supported on Windows Desktop Apps only".
The Solution:
I found the correct version of System.Management.dll in the build TargetFolder\runtimes\win\lib\netcoreappX.x folder. In my case, since I'm using System.Management version 6.0, it is in the "netcoreapp3.1" folder.
Conclusion
There are many cases where Microsoft doesn't do the right thing. In this case, my application was specifically a .NET 5 Windows Desktop application, so we would all think that msbuild could figure out the correct thing to do. Not so. In such a case, I would have at least hoped that .NET Foundation would have provided information on this. Well, now you all know now, as well!
Cheers
Is it possible to develop and build Linux applications with Xamarin with the same code base?
After a few years with Ubuntu, my main OS right now is Windows again. But it's not impossible that I could switch to Mac.
Right now I have a bit of experience with Qt and no experience with Xamarin.
With Qt you can develop on Windows, Linux, and Mac and for Windows, Linux, Mac, iOS, Android, Windows Mobile, ... They are pretty clear about that.
Since Xamarin is free and open source now and I still don't have much experience in Qt, I'm considering trying out Xamarin for cross platform development instead of Qt.
Not being able to release my software for Linux would be a deal breaker for me. Being able to develop on Linux would be nice, but is optional.
But after all my Google research, I could only find information and people asking for support to develop on Linux and not for Linux.
As far as I know, this shouldn't be a problem with Mono alone. But as far as I know Xamarin > Mono and I don't get everything in Mono I could get in Xamarin.
I'm also not sure how well-supported Mono will be in the future. For me it looks like Xamarin is much more important for Microsoft than Mono itself.
I'm not sure if it's even possible, since Xamarin is based on Mono, but is it possible that Microsoft will at some point decide not to support Mono with .NET compatibility in the same way as Xamarin, or even cancel Mono as standalone completely?
So I'm looking for one single framework for all desktop and mobile platforms I can rely on, and I want to know if Xamarin and/or Mono and and/or Xamarin + Mono could be an alternative to Qt before I go deeper into any of those solutions.
Just in case someone else comes accross this q/a: the situation has changed. With Xamarin.Forms 3.0, Gtk# is supported (as preview, at this moment). Therefore, full Linux GUI support is enabled.
So, Xamarin now covers:
Android
iOS
UWP apps
WPF apps
Linux Gtk desktop applications
Mac OS
Watch OS
tv OS
Tizen
The only thing left to wish for: JS/HTML5 Web App target platform, as part of Xamarin :)
No, Xamarin is not available for Linux. This was a conscious decision made by the Xamarin team several years ago:
Miguel de Icaza 2011-08-04 11:52:37 UTC
We face a QA problem here.
The problem with supporting Linux is that we would need to create a
self-contained Mono packaging for all of the bits we ship since most
Linux distributions are slightly off when it comes to Mono.
It also means that if we advertise "Linux" we would need to QA a dozen
different combination due to different Linux distributions and
different editions of each distribution.
Perhaps we would support just a single distribution and a single
version, which is closer to what we have to do on Windows/Mac today.
To clarify, the Xamarin product range is not available on Linux (Xamarin Studio, Xamarin.iOS and Xamarin.Android) but MonoDevelop, the foundation of Xamarin Studio, and Mono, the cross-platform .NET runtime, definitely is.
You can build desktop software using MonoDevelop. The MonoDevelop site has plenty of instructions on getting started:
Install MonoDevelop on Linux
Seems that there is a chance of Xamarin Forms work on linux distros. In this reddit thread Miguel de Icaza says:
Some of our team members actually develop in Linux. The reason why we
never released the Linux tools is because we were charging a lot of
money and people would rightfully expect the software to be fully
supported. We had enough keeping our Mac and Windows users happy, and
adding an unknown number of Linux distributions sounded like a hard
task. Now that we are open sourcing the SDKs and I no longer will feel
bad if something does not work under a particular Linux configuration,
I will be happy to release the Linux builds.
That is: the fact that Forms is an open source tool currently opens this possibility.
Yes, as of mid-2018, it is possible to develop cross platform GUI applications that target windows/mac/linux/android/ios using the "Xamarin.Forms" library. Basically, you have one shared library project from cross platform code (UI and other cross platform stuff), and one project per platform for platform-specific code (Xamarin.Forms have one backend implementation for each platform. On Linux, this is using GTK).
However, with MonoDevelop you can only develop/build the cross-platform project and the linux-specific project of the application. You will still need to use Visual Studio or Rider to develop/build for the other platforms.
See the following answer:
https://stackoverflow.com/a/53317021/298005
https://github.com/0xFireball/xamarin-android-linux
As matthewrdev said, Xamarin.Studio, Xamarin.iOS, and Xamarin.Android aren't "officially" supported; however, Xamarin.iOS uses virtual emulator anyway (and I don't think there will be a workaround for Xamarin.iOS to run on Linux), but for Xamarin Studio (MonoDevelop on Linux, or Jetbrain's Riders (how to run it on linux with no official support is also provided in the link) Can run on Linux as an alt for Xamarin.Studio, and that link I shared explains how to install Xamarin.Android on linux, so just for Xamarin.iOS you will need to migrate or dual boot or sth, I hope that helps! (I stopped using Xamarin my-self, however, this environment helps developing for Xamarin on linux!)
GTK is listed as one of supported platforms/backends for Xamarin.Forms which allows building apps for Linux (as well as macOS and Windows via same GTK project). Though it doesn't look like there was much of development since 2018/2019 and Xamarin.Forms 3.0. Tried running 2 apps with basic UI and compared GTK backedn on Windows/macOS (comparing to WPF and Xamarin.mac back-ends ) and found GTK not worth pursuing (basic scenarios failing).
You can track GTK progress at https://github.com/jsuarezruiz/forms-gtk-progress/blob/master/Status.md
On Ubuntu 20.04, you can run your ASP.Net MVC 5 application using XSP4. Open a console to where you installed your MVC applications, where all folders, Global.asax, Web.config, ... are and run "xsp4 --port 80" or any other port you like and available. XSP4 is an independent web server and does not need Apache to be run.
Also, for C# developers, even the MonoDevelop is not in Ubuntu 20.04, which I don't know why, you can still install it and debug your ASP.Net MVC application. You can also debug any WinForm and console application using the MonoDevelop. YOu can run all your application using mono too.
I need to know is there any way to publish traditional desktop applications to windows store. The link,
http://blogs.msdn.com/b/windowsstore/archive/2012/06/08/listing-your-desktop-app-in-the-store.aspx
says we cannot upload the desktop app, but we can give a url for the customers to download.
I need to know, is there any way to directly upload the exe (or whatever).
Microsoft works on a tool for this aka Project Centennial which is not available for public yet. Officially from here:
Your application should already run on Windows 10. To make it easier for you to distribute and monetize your application, we are developing "Project Centennial". This toolkit will enable you to package and publish your .NET and Win32 applications to the Windows Store. "Project Centennial" is expected to be available for public testing next year.
As mentioned by #vzayko, Project Centennial will be the bridge to use to get your classic Windows application into the Windows Store.
However, until the Windows classic app bridge is publicly available (which should be sometime this year), there is no way to submit your application to the Windows Store.
I am developing a GTK# mono application under openSuse, but I am interested in deploying it for all three platforms (Windows 7, Snow Leopard and as many Linux distributions as I can test on).
Deploying on Linux is not a problem as GTK# comes with the mono libraries, but for Windows I would not like to force the users to install GTK#. Is there a way to embed GTK# in the application, or at least integrate its installation with the installation of my program?
You may deploy GTK# applications without forcing users to install GTK# for .NET on Windows in a number of ways.
You may embed the entire Mono runtime (19 MB overhead) into your Application. Then there won't be any dependencies, your users won't even need to install .NET or MONO. Here's a Guide (I think Banshee uses this).
You may copy all the GTK# assemblies into your program directory. It isn't recommended however because you may run into a lot of problems if the user has another version of the Gtk runtime installed. (Yes GTK+ also needs a runtime).
You may integrate the GTK# installer with the Windows Installer of your application. (Then your users will be able to install both with a single click, no forcing). Many Installer programs can do this.
You may use a Package Management System.
You may use Deployment Management / Dependency Management Software, but this is expensive since all the good ones are propriety.
Though these workarounds can save trouble for your users, in the long run I recommend option 3. It may prove worthwhile to have your users install GTK# because other workarounds may ultimately give more inconvenience to your users than a simple extra installation.
I want to create a windows mobile app (windows mobile 5.0 and above, using CompactFramework [in SharpDevelop]) to capture photos automatically, without user involvement (like it would be with CameraCaptureDialog). After going through google searches I found out a solution that should work (http://blogs.msdn.com/marcpe/archive/2006/03/03/542941.aspx)1 but I cannot compile the source (I guess that is because I use sharpdevelop not MS Visual Studio).
Are there any other options available?
Maybe there is a binary version of that CameraCapture Library somewhere so I can use it without compiling on my own?
Anyone willing to compile the one I linked above and post it somewhere to make binary version available [I tried searching for such in google, but with no success]
The CameraCaptureDialog is part of the Microsoft.WindowsMobile.Forms assembly, which chips in ROM on WinMo 5.0 and later devices. The device SDKs also whip with copies of these assemblies so the apps can build (for example mine is on my PC at C:\Program Files\Windows Mobile 5.0 SDK R2\Managed Libraries). I would assume you should be able to manually add a reference to that assembly in SharpDevelop.