Skip to content

Commit

Permalink
Fix sample build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dotMorten committed Nov 15, 2024
1 parent bc9657b commit ab36e78
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Esri.Calcite.Maui/Esri.Calcite.Maui.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net8.0-windows10.0.19041</TargetFrameworks>
<TargetFrameworks>net8.0;net8.0-windows10.0.19041.0</TargetFrameworks>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
21 changes: 11 additions & 10 deletions src/Esri.Calcite.WinUI/Esri.Calcite.WinUI.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041</TargetFramework>
<ShortTargetFramework>net8.0-windows10.0.19041</ShortTargetFramework>
<TargetFramework>$(ShortTargetFramework).0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<UseWinUI>true</UseWinUI>
<Description>$(Description) for WinUI</Description>
Expand All @@ -9,32 +10,32 @@
<DisableEmbeddedXbf>false</DisableEmbeddedXbf>
<Nullable>enable</Nullable>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net7.0'))">true</IsAotCompatible>
<IsAotCompatible>true</IsAotCompatible>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WindowsSdkPackageVersion>10.0.19041.38</WindowsSdkPackageVersion>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<PublishAot>True</PublishAot>
</PropertyGroup>

<ItemGroup>
<Content Include="..\..\fonts\*.ttf" Link="Fonts\%(Filename)%(Extension)" PackagePath="lib\$(TargetFramework)\$(PackageId)\Fonts\%(Filename)%(Extension);contentFiles\any\$(TargetFramework)\$(PackageId)\Fonts\%(Filename)%(Extension)" />
<Content Include="..\..\fonts\*.ttf" Link="Fonts\%(Filename)%(Extension)" PackagePath="lib\$(ShortTargetFramework)\$(PackageId)\Fonts\%(Filename)%(Extension);contentFiles\any\$(ShortTargetFramework)\$(PackageId)\Fonts\%(Filename)%(Extension)" />
<None Remove="Styles\Controls\TreeView.xaml" />
<Compile Include="..\..\GeneratedResources\WinUI\*.cs" Link="GeneratedResources\%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
<Page Include="..\..\GeneratedResources\WinUI\**\*.xaml" PackagePath="lib\$(TargetFramework)\$(PackageId)\" Pack="True">
<Page Include="..\..\GeneratedResources\WinUI\**\*.xaml" PackagePath="lib\$(ShortTargetFramework)\$(PackageId)\" Pack="True">
<Generator>MSBuild:Compile</Generator>
<Link>%(RecursiveDir)\%(Filename).xaml</Link>
</Page>
<Page Update="**\*.xaml" PackagePath="lib\$(TargetFramework)\$(PackageId)\" Pack="True" />
<Page Update="**\*.xaml" PackagePath="lib\$(ShortTargetFramework)\$(PackageId)\" Pack="True" />
<None Include="README.txt" Pack="True" PackagePath="\" />
<None Include="..\..\docs\winui.md" Link="README.md" Pack="True" PackagePath="\README.md" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240923002" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240829007" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" />
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.2.0" >
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2651.64" IncludeAssets="none" /> <!-- Work around bug in webview package, and we don't really need this anyway -->
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/TestApps/WinUITests/Samples/UIIconsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public UIIconsPage()
{
this.InitializeComponent();
icons = new List<IconEntry>();
foreach (var i in Enum.GetValues(typeof(CalciteIcon)))
foreach (var i in Enum.GetValues<CalciteIcon>())
{
icons.Add(new IconEntry() { Icon = (CalciteIcon)i });
}
Expand Down

0 comments on commit ab36e78

Please sign in to comment.