Страница:
Migrating from Preview 9 to 10
Страницы
.NET 7 and .NET MAUI
Blazor Desktop
CLI iOS Simulator Selection
Capturing Binary Logs
Customizing Controls with Handlers
DeviceTests
FAQs
Guidelines for Customization of Controls
Handler Property PR Guidelines
Home
Installing .NET
Known Issues
Memory Leaks
Migrating Xamarin.Forms Effects
Migrating from Preview 10 to 11
Migrating from Preview 7 to 8
Migrating from Preview 8 to 9
Migrating from Preview 9 to 10
Migrating from Xamarin.Forms (Preview)
Migrating from Xamarin.Forms to .NET MAUI
Migrating to Preview 13
Migrating to Preview 14
Migrating to RC1
News
Nightly Builds
Porting Custom Renderers to Handlers
Profiling .NET MAUI Apps
Release Versions
Roadmap
Single Project
Status
Testing
UITests
Upgrading .NET MAUI from .NET 7 to .NET 8
Using Custom Renderers in .NET MAUI
Xamarin.Forms MAUI.Controls Layout Differences
Xamarin.Forms vs .NET MAUI
6
Migrating from Preview 9 to 10
David Ortinau редактировал(а) эту страницу 2021-11-03 20:36:56 -05:00
Содержание
Windows changes
Windows is now supported by default. Update the Windows references:
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks>
...
</PropertyGroup>
Replace your Windows package references with the these two:
<ItemGroup Condition="$(TargetFramework.Contains('-windows'))">
<!-- Required - WinUI does not yet have buildTransitive for everything -->
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.0.0-preview3" />
<PackageReference Include="Microsoft.Graphics.Win2D" Version="1.0.0.29-preview3" />
</ItemGroup>
Update SupportedOSPlatformVersion
and add new TargetPlatformMinVersion
in the first <PropertyGroup>
.
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.17763.0</TargetPlatformMinVersion>
Update the RuntimeIdentifier:
<PropertyGroup Condition="$(TargetFramework.Contains('-windows'))">
<OutputType>WinExe</OutputType>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
</PropertyGroup>
New MauiIcon
For the app icon, update your <MauiImage IsAppIcon="True">
to use the new type <MauiIcon />
.
<MauiIcon Include="Resources\appicon.svg" ForegroundFile="Resources\appiconfg.svg" Color="#512BD4" />
Optional Updates
Our new templates have now adopted .NET 6-isms such as global using and scoped namespaces.
General Info
- How to Contribute
- Handler Property PR Guidelines
- Official Documentation
- Roadmap
- FAQs
- Nightly Builds
- Releases