MAUI Lets You Create a Cross-Platform Mobile App with .NET and C# From a Single Codebase

No Comments »

What if we could create native mobile apps and desktop apps using .NET C# and XAML from a single code base? How cool would that be? Yes, now we can create native Android, iOS, macOS, and Windows applications from a single code base. This is possible using .NET’s new feature called Multi-platform App UI (MAUI). .NET Multi-platform App UI (.NET MAUI) is a cross-platform framework for creating native mobile and desktop apps with C# and XAML. Microsoft Build 2020 announced that Microsoft has evolved Xamarin.Forms and taken the next step in the .NET unification to give us a cross-platform mobile-first framework for Android, iOS, macOS, and Windows. .NET MAUI will introduce new ways to build applications – available in .NET 6 and in preview now!

What is .NET MAUI?

.NET Multi-platform App UI (MAUI) is the evolution of Xamarin. Forms extended from mobile to desktop scenarios with UI controls rebuilt from the ground up for performance and extensibility. – Maddy Leger, Program Manager Xamarin/.NET MAUI Team. is an open-source cross-platform framework which can be used to develop and build native Android, iOS, macOS, and Windows applications from a single code base.

What are Xamarin and Xamarin.Forms?

Xamarin is an open-source .NET platform for building iOS, Andriod, macOS, and Windows applications. It was introduced in 2011. It allows us to share business logic across platforms, using .NET, while creating a native UI for each. Xamarin allows developers to share an average of 90% of their application across platforms. To help with the overhead of creating native UI’s for each platform, we have Xamarin.Forms.

Xamarin.Forms is an open-source UI framework that allows us to combine the code for Xamarin.Android, Xamarin.iOS, Xamarin.Mac, and Windows applications into a single shared codebase.

Microsoft is now thinking about creating a unified .NET platform that can replace .NET Framework, .NET Core, and Xamarin. .NET MAUI is the next step in unifying .NET by replacing Xamarin.Forms. It addresses some of the issues and downsides of Xamarin.Forms, while providing an updated architecture on top of the new generation of .NET and project system.

Difference between MAUI and Xamarin.Forms

Microsoft is rebuilding the core of Xamarin.Forms, bringing us performance improvements, consistent design systems, and an extension from mobile to desktop. Now you may ask if we use Xamarin.Forms then why should we move to MAUI? Why is so special about MAUI?

.NET MAUI provides cross-platform APIs for native device features. It has some major Improvements like a Single project experience across platforms and .NET hot reload. .NET MAUI allows us to have a single project experience instead of one project for each target platform. We can use one language across our application to target all the supported platforms and easily share resources across them while maintaining an option for platform-specific code. Also the Model-View-ViewModel (MVVM) and XAML pattern used in existing Xamarin.Forms applications will continue to be supported and improved with the evolution. .NET MAUI will introduce further support for the Model-View-Update (MVU) development pattern, popular in C#, enabling developers to write fluent C# UI and create a code-first development experience.

How .NET MAUI works?

.NET MAUI unifies Android, iOS, macOS, and Windows APIs into a single API that allows a write-once run-anywhere developer experience, while additionally providing deep access to every aspect of each native platform.

.NET 6 provides a series of platform-specific frameworks for creating apps: .NET for Android, .NET for iOS, .NET for macOS, and Windows UI 3 (WinUI 3) library. These frameworks all have access to the same .NET 6 Base Class Library (BCL). This library abstracts the details of the underlying platform away from your code. The BCL depends on the .NET runtime to provide the execution environment for your code. For Android, iOS, and macOS, the environment is implemented by Mono, an implementation of the .NET runtime. On Windows, Win32 provides the execution environment.

.NET MAUI provides a single framework for building the UIs for mobile and desktop apps. The following diagram shows a high-level view of the architecture of a .NET MAUI app:

.NET MAUI architecture diagram.

In a .NET MAUI app, you write code that primarily interacts with the .NET MAUI API (1). .NET MAUI then directly consumes the native platform APIs (3). In addition, app code may directly exercise platform APIs (2), if required.

About .NET hot reload

.NET MAUI includes support for .NET hot reload, which enables you to modify your managed source code while the app is running, without the need to manually pause or hit a breakpoint. Hot reload increases productivity for .NET developers, allowing instant updates to running applications with new code changes. .NET MAUI includes support for XAML hot reload, which enables you to save your XAML files and see the changes reflected in your running app without recompilation. In addition, your navigation state and data will be maintained, enabling you to quickly iterate on your UI without losing your place in the app.

During Microsoft Build 2021, Microsoft announced the availability of .NET MAUI Preview 4. Each preview provides us with more features and tools with general availability scheduled for November 2021 at .NET Conf. With the release of Preview 4, we can now create functional applications across all supported platforms using .NET MAUI. In addition, they have added new capabilities to support running Blazor on desktop using .NET MAUI, allowing the reuse of Blazor UI components across native desktop and web applications. Alongside Preview 4 is the release of Visual Studio 2019 version 16.11 Preview. The Visual Studio 2019 16.11 Preview enables .NET Hot Reload for MAUI and provides productivity features for developing .NET MAUI projects. To see what is coming in future releases, visit the MAUI product roadmap.

Major Dot NET Update 7 Is About to Be Released Soon

No Comments »

.NET is one of the best software development framework and ecosystem designed and supported by Microsoft that allows for easy desktop and web application engineering. It’s a popular free platform which is used for a lot of different types of applications as it provides the programming environment for most software development phases. .NET best suits businesses that look for a wide range of features like web-based services, desktop software, and cloud infrastructure support. .NET provides a lot of features to build applications on Windows, Linux, macOS, iOS, watchOS, Android, tvOS, or using WebAssembly. The platform comes with new APIs, language features, and runtime capabilities.

Recently, Microsoft .NET open source framework just celebrated its 20th birthday and the company is now pushing ahead with a new version, .NET 7. In a blog post, Microsoft said they would be releasing .NET 7 Preview 1 alongside ASP.NET Core Preview 1 and EF7 Preview 1.

“.NET 7 is built on the foundation established by .NET 6, which includes a unified set of base libraries, runtime, and SDK, a simplified development experience, and higher developer productivity,” says Microsoft’s Jeremy Likness. “Major areas of focus for .NET 7 include improved support for cloud native scenarios, tools to make it easier to upgrade legacy projects, and simplifying the developer experience by making it easier to work with containers.”

.NET 7 Preview 1 is now available!. This is the first preview of the next major version of .NET, which will include the next wave of innovations for web development with ASP.NET Core. This .NET 7 Preview 1 is the first of many. .NET 7 preview releases in preparation for the .NET 7 release in November 2022.

In May 2019, the company announced the big release that would tie the ecosystem together: All .NET elements were supposed to be bundled in the .NET 5 development platform. While changes were made to the schedule because of COVID-19, the .NET 5 unified development platform was finally introduced in November 2020. The successor to .NET Core 3.1 and .NET Framework 4.8, .NET 5 puts order into the fragmentation of the .NET world. It includes ASP.NET Core, Xamarin, Entity Framework Core, WPF, WinForms, and ML.NET. While .NET 5 set the unification foundations, the newest .NET 6 version delivered the final parts of it in November 2021, with Visual Studio 2022 released the same day. This is a unified platform for building projects across cloud, browser, IoT, mobile, and desktop environments, enabling all to use the same .NET libraries, SDK, and runtime.

Some headline features of this .NET 7 is the addition of .NET Multi-platform App UI (MAUI). Also, the new tools that will make it easier to build cloud-native apps by simplifying the setup and configuration necessary to implement secure authentication and authorization, and also improving the performance of application startup and runtime execution.

More .NET news

.NET Framework 4.5.2, 4.6, and 4.6.1 will reach End of Support on Apr 26, 2022. After this date, they will no longer provide updates, including security fixes or technical support for these versions. If you are currently using .NET Framework 4.5.2, 4.6, or 4.6.1 runtime you need to update your deployed runtime to a more recent version – at least .NET Framework 4.6.2 before April 26, 2022 – in order to continue to receive updates and technical support. There is no need for you to retarget or recompile your application against .NET Framework 4.6.2. When .NET Framework 4.5.2, 4.6, and 4.6.1 reach the end of support, applications that run on top of these versions will continue to run. Starting May 2022, Microsoft won’t be issuing security updates for .NET Framework 4.5.2, 4.6, and 4.6.1 when they issue these security updates for .NET Framework 4.6.2 and later versions. This means that starting May 2022, if a computer has .NET Framework 4.5.2, 4.6, or 4.6.1 installed, it may be insecure. Additionally, if you run into any issue and need technical support, you will be asked to first upgrade to a supported version.

Now you may ask why are they doing this?

The .NET Framework was previously digitally signed using certificates that use the Secure Hash Algorithm 1 (SHA-1). SHA-1 is a legacy cryptographic hashing algorithm that is no longer deemed secure. After looking at download and usage data across the different versions of .NET Framework, they have found that updating .NET Framework 4.6.2 and newer versions to support newer digital certificates (for the installers) would satisfy the vast majority (98%) of users without them needing to make a change. The small set of users using .NET Framework 4.5.2, 4.6, or 4.6.1 will need to upgrade to a later .NET Framework version to stay supported.

There is no change to the support timelines for any other .NET Framework version, including .NET Framework 3.5 SP1, which will continue to be supported as documented on .NET Framework Lifecycle FAQ.

After many years opposing open source, Microsoft is now leaning into making the space better. It’s fair to say many developers were initially skeptical of Microsoft and its commitment to making open source tools as the company, seeking to maintain its dominant position, opposed many developers and projects. But Microsoft’s GitHub acquisition(opens in a new tab) for $7.5 billion in 2018 helped the company turn a new page and win over skeptics.

By maintaining .NET 7 – which is truly open source and cross-platform – so thoroughly (you could even say lovingly), Microsoft is doing its bit for the furtherance of computing. Tell us what is, please share with us what you think about this new .NET 7 release.

Google Considered C# as the Native Language for Android

5 Comments »

Wow, I nearly fell out of my chair when I read this little gem on TechCrunch:

Android chief Andy Rubin wrote in a 2005 email, “If Sun doesn’t want to work with us, we have two options: 1) Abandon our work and adopt MSFT CLR VM and C# language – or – 2) Do Java anyway and defend our decision, perhaps making enemies along the way.”

Imagine how different the world would be today if Google had chosen .NET instead of Java as the native development framework for the Android mobile operating system…

Read more at DevTopics >>

.NET Isn’t Dead

2 Comments »

I jump into the controversy about the future of the .NET Framework and HTML5+JavaScript.

Read “.NET Isn’t Dead” on DevTopics.com >>

Visual Studio 2010 Service Pack 1

No Comments »

Microsoft Visual Studio. Copyright © Microsoft Corp.

Microsoft has released Service Pack 1 for its Visual Studio 2010 flagship integrated development environment (IDE).  Visual Studio SP1 provides many new features, performance improvements, and bug fixes including:

  • Stand-alone Help Viewer 1.1
  • Silverlight 4 support
  • Basic Unit Testing support for .NET 3.5
  • .NET Framework 4 improvements
  • Performance Wizard for Silverlight
  • Visual Basic Runtime embedding
  • IntelliTrace for 64-bit and SharePoint
  • Fix for partial or mixed Visual Studio installations
  • IIS 7.5 Express support
  • SQL Server CE 4 support
  • Razor support for ASP.NET Web Pages and MVC 3
  • Web Platform Installer integration
  • HTML5 and CSS3 preliminary support
  • WCF RIA Services localized and supported
  • XAML Editor/Designer improvements
  • XAML Style IntelliSense
  • C++ MFC-based GPU-accelerated graphics and animations
  • New AMD and Intel instruction set support

Download Visual Studio 2010 SP1
Full Description of VS 2010 SP1
Tips on Installing VS 2010 SP1

.NET Framework 4 and Extensions Poster

1 Comment »

.NET Framework 4 and Extensions Poster (PDF)

Click the image above to download a .NET Framework 4 and Extensions poster from Microsoft.

Want more .NET posters?  Devcurry has published a collection of .NET Framework and Visual Studio posters including keyboard shortcut, namespace and type posters.

.NET and Visual Studio Poster Collection

Visual Studio 2010 and .NET Framework 4.0 Released Today

No Comments »

Microsoft is releasing Visual Studio 2010, .NET Framework 4.0, and Silverlight 4 at the Visual Studio Developer Conference in Las Vegas.  VS 2010 and .NET 4 are available today, and Silverlight 4 will be available to download later this week.

Read more at DevTopics >>

Visual Studio 2010 and .NET Framework 4 Release Candidate

1 Comment »

The Release Candidate (RC) for Visual Studio 2010 and .NET Framework 4.0 is now available to the public.  The biggest change from Beta 2 is a major improvement to Visual Studio performance, specifically as it relates to loading solutions, typing, building and debugging.  The RC includes a “go-live license” for companies that wish to deploy Visual Studio 2010 in their production environment.

Download VS 2010 and .NET 4.0 RC

Visual Studio Myth Buster

No Comments »

Do you need help convincing your boss that your company needs to upgrade to Visual Studio 2010?  Or perhaps you are looking for additional ammo in your .NET vs. Java religious wars with your programming colleagues?

Microsoft has produced a Silverlight-based “Myth Busting Matrix” for Visual Studio.  This nifty web tool details the benefits of upgrading to Visual Studio 2010 and helps dispel some widely-held myths about Visual Studio and the Microsoft .NET Framework.  You can browse all three supported versions of Visual Studio (2005, 2008 and 2010) by your areas of interest and click on the myths for more information.

Visual Studio Myth Buster

Visual Studio Myth Buster

Visual Studio 2010 and .NET 4.0 Beta 2

No Comments »

The second beta version of Visual Studio 2010 and Microsoft .NET Framework v4.0 are now available.  VS 2010 and .NET 4.0 deliver significant new capabilities and improvements.  The Beta 2 release was focused on performance, stability, and the integration of the overall feature set.  The development team is awaiting our feedback on the product and preparing for the final release candidate (RC).  Beta 2 includes a “go-live” license, which means you can start using these tools for your production projects.

VS 2010 and .NET 4.0 are slated to be released on March 22, 2010.

Download VS 2010 and .NET 4.0 Beta 2
More details about Beta 2 from Scott Gu

« go backkeep looking »