Skip to content

Commit

Permalink
fix: Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrandolph committed Jul 25, 2023
1 parent d46a74c commit d2060e0
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 37 deletions.
6 changes: 2 additions & 4 deletions samples/MauiEmbedding/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.2.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.3.230502000" />
<!-- Use previous version for unpackaged apps due to build issue https://github.com/microsoft/WindowsAppSDK/issues/3591 -->
<!-- <PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.2.230313.1" /> -->
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.3.230602002" />
<PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
<PackageVersion Include="Uno.Extensions.Logging.OSLog" Version="1.4.0" />
<PackageVersion Include="Uno.Material.WinUI" Version="2.6.1" />
Expand All @@ -19,4 +17,4 @@
<PackageVersion Include="Uno.WinUI.RemoteControl" Version="4.9.20" />
<PackageVersion Include="CommunityToolkit.Maui" Version="2.0.0" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- This is only required because this project references Uno.Extensions.Maui.WinUI as a package reference (ie by source) -->
<Import Project="..\..\..\src\Uno.Extensions.Maui.UI\build\Package.props" />

<PropertyGroup>
<TargetFrameworks>net6.0-ios;net6.0-android;net6.0-maccatalyst</TargetFrameworks>
<SingleProject>true</SingleProject>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<!-- This is only required because this project references Uno.Extensions.Maui.WinUI as a package reference (ie by source) -->
<Import Project="..\..\..\src\Uno.Extensions.Maui.UI\build\Package.props" />

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<Page
x:Class="MauiEmbedding.Presentation.MCTControlsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:embed="using:Uno.Extensions.Maui"
xmlns:local="using:MauiEmbedding.Presentation"
xmlns:maui="using:Microsoft.Maui.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
xmlns:uen="using:Uno.Extensions.Navigation.UI"
xmlns:utu="using:Uno.Toolkit.UI"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
NavigationCacheMode="Required"
mc:Ignorable="d">
<Page x:Class="MauiEmbedding.Presentation.MCTControlsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:embed="using:Uno.Extensions.Maui"
xmlns:local="using:MauiEmbedding.Presentation"
xmlns:maui="using:Microsoft.Maui.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="using:CommunityToolkit.Maui.Views"
xmlns:uen="using:Uno.Extensions.Navigation.UI"
xmlns:utu="using:Uno.Toolkit.UI"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
NavigationCacheMode="Required"
mc:Ignorable="d">

<Grid>
<Grid.RowDefinitions>
Expand All @@ -21,28 +20,26 @@
</Grid.RowDefinitions>
<utu:NavigationBar Content="{Binding Title}" />

<StackPanel
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock FontSize="24" Text="MCT controls" />
<StackPanel Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock FontSize="24"
Text="MCT controls" />
<embed:MauiContent>
<maui:ScrollView>
<maui:ScrollView.Content>
<maui:VerticalStackLayout Spacing="16">
<toolkit:DrawingView
HeightRequest="300"
IsMultiLineModeEnabled="true"
LineColor="{embed:MauiColor Value='#FF0000'}"
LineWidth="5"
WidthRequest="300" />
<toolkit:DrawingView HeightRequest="300"
IsMultiLineModeEnabled="true"
LineColor="{embed:MauiColor Value='#FF0000'}"
LineWidth="5"
WidthRequest="300" />

<toolkit:Expander>
<toolkit:Expander.Header>
<maui:Label
FontAttributes="Bold"
FontSize="16"
Text="Simple Expander (Tap Me)" />
<maui:Label FontAttributes="Bold"
FontSize="16"
Text="Simple Expander (Tap Me)" />
</toolkit:Expander.Header>

<toolkit:Expander.Content>
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<PackageVersion Include="Microsoft.Net.Compilers.Toolset" Version="4.2.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.7.1" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" Condition="$(UseMaui) != 'true'" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.1.0" Condition="$(UseMaui) != 'true'" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.1.0" />
<PackageVersion Include="Moq" Version="4.17.2" />
<PackageVersion Include="Refit" Version="6.3.2" />
<PackageVersion Include="Refit.HttpClientFactory" Version="6.3.2" />
Expand Down

0 comments on commit d2060e0

Please sign in to comment.