Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Templates/src/templates/maui-mobile/MauiApp.1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<!--#if (IncludeSampleContent) -->
<!-- https://github.com/CommunityToolkit/Maui/issues/2205 -->
<NoWarn>XC0103</NoWarn>
<!-- https://github.com/CommunityToolkit/Maui/issues/2921 -->
<NoWarn>NU1608</NoWarn>
Comment on lines +22 to +23
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This avoids the nuget restore warnings:

warning NU1608: Detected package version outside of dependency constraint: 
    CommunityToolkit.Maui 11.1.1 requires Microsoft.Maui.Controls (>= 9.0.30 && < 10.0.0) 
    but version Microsoft.Maui.Controls 10.0.0 was resolved.
warning NU1608: Detected package version outside of dependency constraint:
    CommunityToolkit.Maui.Core 11.1.1 requires Microsoft.Maui.Core (>= 9.0.30 && < 10.0.0) 
    but version Microsoft.Maui.Core 10.0.0 was resolved.

<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>
<!--#endif -->

Expand Down Expand Up @@ -76,6 +76,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Essentials" Version="$(MauiVersion)" />
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes

error NU1107: Version conflict detected for Microsoft.Maui.Essentials.
    Install/reference Microsoft.Maui.Essentials 10.0.0 directly to project MauiApp1 to resolve this issue. 
    MauiApp1 -> Microsoft.Maui.Controls 10.0.0 -> Microsoft.Maui.Controls.Core 10.0.0 -> Microsoft.Maui.Core 10.0.0 -> Microsoft.Maui.Essentials (>= 10.0.0) 
    MauiApp1 -> CommunityToolkit.Maui 11.1.1 -> CommunityToolkit.Maui.Core 11.1.1 -> Microsoft.Maui.Essentials (>= 9.0.30 && < 10.0.0).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put this inside a block, so it's only there for --sample-content?

<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="MS_EXT_LOG_DEBUG_VERSION" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ public class SimpleTemplateTest : BaseTemplateTests
[TestCase("maui", DotNetPrevious, "Release", false, "", "")]
[TestCase("maui", DotNetCurrent, "Debug", false, "", "")]
[TestCase("maui", DotNetCurrent, "Release", false, "", "TrimMode=partial")]
// TODO: Re-enable tests once the Community Toolkit supports .NET 10. More details: https://github.com/dotnet/maui/issues/32151
//[TestCase("maui", DotNetCurrent, "Debug", false, "--sample-content", "")]
//[TestCase("maui", DotNetCurrent, "Release", false, "--sample-content", "TrimMode=partial")]
[TestCase("maui", DotNetCurrent, "Debug", false, "--sample-content", "")]
[TestCase("maui", DotNetCurrent, "Release", false, "--sample-content", "TrimMode=partial")]
//Debug not ready yet
//[TestCase("maui", DotNetCurrent, "Debug", false, "--sample-content", "UseMonoRuntime=false")]
//[TestCase("maui", DotNetCurrent, "Release", false, "--sample-content", "UseMonoRuntime=false EnablePreviewFeatures=true")]
Expand Down
Loading