Can Blazor Hybrid apps be cross-platform? - winforms

I trying to find the most suitable Framework to port my legacy WinForms applications to the new technology. But the best way for me is cross-platform app.
I can build a Blazor Hybrid Windows Forms app. But can it be built as a cross-platform: for Windows, OSX, Linux ?
If no what can I use?

I believe that Blazor Hybrid apps can be cross-platform if the app is a .Net MAUI Blazor App.
The Microsoft documentation here shows how to create this type of app using Visual Studio 2022 (Preview edition at the time of writing in early June 2022). The application is shown running as both a Windows desktop app and an Android app.
You can see in the image above that Visual Studio says that the .Net MAUI Blazor App targets macOS as well as other platforms. But, there does not seem to be support for Linux. Further, the MAUI documentation states that a Mac is required to build for iOS and macOS.

Blazor Hybrid can be implemented in different containers, so you could have Uno Blazor Hybrid. There is already a COM+ Blazor Hybrid.
So - Yes. That's the point of it. Write once, run everywhere (assuming a shared Razor library).

Related

.NET Framework Winforms App on Windows IOT

I have a Winforms application built on .NET Framework 4.7 running on client's desktops. Client would like to run it on a tablet running Windows IOT. Is this possible?
I've found a couple of articles indicating it should run on Windows IOT Enterprise, but not Windows IOT. However, I haven't been able to find much specific official documentation.
Can anyone enlighten me and/or point me to some official documentation?

.NET Native Compilation with Desktop Bridge to UWP

I have a wpf application which I want to host on windows app store. I am thinking of using the desktop bridge to convert WPF to UWP without code changes. However, is it possible to make use of .net native compilation while using the desktop bridge approach in visual studio 2017???
No, this is not possible today for your WPF code - even with the Desktop Bridge. You can only do it for regular UWP projects that are targeting the .NET Core for UWP runtime.

How to develop OSX application using Visual studio for Mac preview

I have .Net Winform project(c#) working in windows.Now,i want to do same project, to work as OSX App in Mac. As per my understanding Microsoft recently launched Visual studio for Mac preview and also it support OSX app development using Xamarin.Mac and also it support .Netcore .
Instead of creating Osx app from scratch,i need to reuse the code which is available in .net winform project.
can i develop UI application using .netcore project? I think .netframework and .netcore more or less same.can i port .netframework to .netcore project and create osx app ?
or
can i use xamarin.mac and reuse the .netframework c# code to create osx app?
I am new to this,so kindly suggest the best way to create OSX app using Visual studio for Mac preview. (Basically i need Tabel view,form controls and graph(there i use zedgraph).Is these view are available here.
In general, the "standard" way of developing cross platform applications is to separate as much of your logic as possible into shared libraries of some type and create "thin" UIs specific to each platform.
Depending on your need, you could easily make that shared code netstandard/PCL/etc compatible and share between platforms or just recompile the project in each solution.
NSTableView will likely solve your needs, but expect it to be significantly more primitive that what you are used to on Windows. Graph controls don't come built in, so you'll need to find a vendor that ships Cocoa controls or draw them yourself.
Here is the quickstart documentation.
Xamarin.Forms support for macOS is coming in the future, currently earmarked for Q2 this year.

WACK Error after Converting WPF to UWP using Desktop App Converter

I was trying to convert my awesome WPF app to UWP using the Desktop App Converter.
I converted the app using DesktopAppConverter successfully, installed on my local Windows 10 machine and works like a charm. All good so far.
However when I tried the Windows App Certification process, it fails with the below error.
API _amsg_exit in msvcr100.dll is not supported for this application type.
API _cexit in msvcr100.dll is not supported for this application type.
API _commode in msvcr100.dll is not supported for this application type.
I actually use many essential functionalities via a CPP library which was created using some python code (which I don't have source code for).
(I guess "msvcr100.dll" is Microsoft C++ Re-distributable Package? )
Can any one help resolve this issue?
The WACK tool in the Windows 10 AU SDK is not applicable to Desktop Bridge app. You don't need to run it prior to submission. The error you are seeing here you can ignore.
Upcoming new versions of the SDK will have an updated WACK tool with specific support for Desktop Bridge apps.
Thanks!

Can I run my .NET program in a container?

I’m just starting out with containers and was wondering if I can run my .NET program in a container. What’s the recommended way to do this?
If you are talking about a Web application, you could use .Net Core, that runs on Windows and Linux (Desktop, VM, Docker).
Some useful links:
What is .Net Core?
Official page - install guide
Official .Net core docker images
Yes, you can containerize .NET Framework apps and run them in windows containers: https://www.docker.com/products/windows-containers
I would recommend using .NET Core if your codebase isn't huge (either a small app or a greenfield project) and you don't need any .NET Framework/Windows specific libraries.

Resources