Skip to content

Commit

Permalink
Edits.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbritch committed Dec 21, 2023
1 parent 1bc78dd commit aabfbcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/migration/multi-project-to-multi-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ no-loc: [ "Xamarin.Forms", "Xamarin.Essentials", "Xamarin.CommunityToolkit", ".N

Upgrading a multi-project Xamarin.Forms app to a multi-project .NET Multi-platform App UI (.NET MAUI) app follows the same steps as a Xamarin.Android and Xamarin.iOS project, with additional steps to take advantage of changes in .NET MAUI.

This article describes how to manually migrate a Xamarin.Forms library project to a .NET MAUI library project. Before you do this, you must update your Xamarin.Forms platform projects to be SDK-style projects. SDK-style projects are the same project format used by all .NET workloads, and compared to many Xamarin projects are much less verbose. For information about updating your app projects, see [Upgrade Xamarin.Android, Xamarin.iOS, and Xamarin.Mac apps to .NET](native-projects.md), [Xamarin.Android project migration](android-projects.md) and [Xamarin Apple project migration](apple-projects.md).
This article describes how to manually migrate a Xamarin.Forms library project to a .NET MAUI library project. Before you do this, you must update your Xamarin.Forms platform projects to be SDK-style projects. SDK-style projects are the same project format used by all .NET workloads, and compared to many Xamarin projects are much less verbose. For information about updating your app projects, see [Upgrade Xamarin.Android, Xamarin.iOS, Xamarin.Mac, and UWP projects to .NET](native-projects.md), [Xamarin.Android project migration](android-projects.md)m [Xamarin Apple project migration](apple-projects.md) and [Xamarin.Forms UWP project migration](uwp-projects.md).

To migrate a Xamarin.Forms library project to a .NET MAUI library project, you must:

Expand Down Expand Up @@ -80,6 +80,7 @@ using Android.App;
using Android.Runtime;
using Microsoft.Maui;
using Microsoft.Maui.Hosting;
using YOUR_MAUI_CLASS_LIB_HERE;

namespace YOUR_NAMESPACE_HERE.Droid
{
Expand All @@ -104,7 +105,6 @@ using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.OS;
using YOUR_MAUI_CLASS_LIB_HERE;

namespace YOUR_NAMESPACE_HERE.Droid
{
Expand Down
2 changes: 1 addition & 1 deletion docs/migration/uwp-projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ A .NET 8 project for a .NET MAUI WinUI 3 app is similar to the following example
```

> [!IMPORTANT]
> You must add `<UseMaui>true</UseMaui>` to the project file to enable .NET MAUI support. In addition, ensure you've added `<EnableDefaultMauiItems>false</EnableDefaultMauiItems>` to the project file. This will stop you receiving build errors about the `InitializeComponent` method already being defined.
> You must add `<UseMaui>true</UseMaui>` to your project file to enable .NET MAUI support. In addition, ensure you've added `<EnableDefaultMauiItems>false</EnableDefaultMauiItems>` to the project file. This will stop you receiving build errors about the `InitializeComponent` method already being defined.
## Changes to MSBuild properties

Expand Down

0 comments on commit aabfbcb

Please sign in to comment.