Skip to content

Commit dca3da8

Browse files
committed
- enable targeting .NET 7 and/or .NET 8 in codegen and in each NuGet
- align targeting of each NuGet with that of base NuGet: .NET 7 and .NET 8 for CSharpMarkup.WinUI, .NET 7 for all others - automate code generation and package build for all NuGets - fix build errors on Windows when using produced NuGets by adding known workaround for Windows App SDK issue
1 parent bbf51c4 commit dca3da8

File tree

52 files changed

+323565
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+323565
-238
lines changed

src/CSharpMarkup.WinUI.LiveChartsCore.SkiaSharpView/CSharpMarkup.WinUI.LiveChartsCore.SkiaSharpView.csproj

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
<PropertyGroup>
33
<Configurations>Debug;Release;Generate</Configurations>
44
<IsUno>true</IsUno>
5+
6+
<!-- Workaround for PRI resource build errors and dotnet build support, from https://github.com/dotnet/maui/issues/5886#issuecomment-1123106200 -->
7+
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
8+
<GenerateLibraryLayout>true</GenerateLibraryLayout>
59
</PropertyGroup>
610

711
<PropertyGroup>
@@ -40,37 +44,14 @@
4044
</PropertyGroup>
4145

4246
<PropertyGroup>
43-
<TargetFrameworks>net7.0-windows10.0.19041;net7.0;net7.0-android;net7.0-ios;net7.0-maccatalyst;net7.0-macos</TargetFrameworks>
47+
<TargetFrameworks>$(CSharpMarkupWinUINet7TargetFrameworks)</TargetFrameworks>
4448
<RootNamespace>CSharpMarkup.WinUI.LiveChartsCore.SkiaSharpView</RootNamespace>
4549
</PropertyGroup>
4650

47-
<PropertyGroup Condition="$(TargetFramework.Contains('windows10.'))">
48-
<IsUno>false</IsUno>
49-
50-
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
51-
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
52-
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
51+
<PropertyGroup Condition="$(IsUno)==false">
5352
<UseWinUI>true</UseWinUI>
54-
<WindowsAppSDKWinUI>true</WindowsAppSDKWinUI> <!-- Workaround for https://github.com/unoplatform/uno/discussions/13569 -->
55-
</PropertyGroup>
56-
57-
<PropertyGroup Condition="$(IsUno)">
58-
<DefineConstants>$(DefineConstants);HAS_UNO</DefineConstants>
59-
</PropertyGroup>
60-
61-
<PropertyGroup Condition=" '$(Configuration)' == 'Generate' ">
62-
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
63-
<CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
6453
</PropertyGroup>
6554

66-
<ItemGroup Condition=" '$(Configuration)' == 'Generate' ">
67-
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/*/**/*.cs" />
68-
</ItemGroup>
69-
70-
<ItemGroup>
71-
<Compile Remove="Generated/Uno.*/**/*.cs" />
72-
</ItemGroup>
73-
7455
<ItemGroup Condition="$(IsUno)==false">
7556
<PackageReference Include="Microsoft.WindowsAppSDK" ExcludeAssets="build;analyzers;buildTransitive" />
7657
<PackageReference Include="LiveChartsCore.SkiaSharpView.WinUI" ExcludeAssets="build;analyzers" />
@@ -93,7 +74,7 @@
9374
</ProjectReference>
9475
</ItemGroup>
9576

96-
<ItemGroup Condition="$(IsUno)" >
77+
<ItemGroup Condition="$(IsUno)">
9778
<!-- Workaround for https://github.com/microsoft/WindowsAppSDK/issues/3546 -->
9879
<None Include="DependenciesPackagesAssets\**" Pack="true" PackagePath="lib\net7.0-windows10.0.19041\" />
9980
</ItemGroup>

src/CSharpMarkup.WinUI.LiveChartsCore.SkiaSharpView/Generated/SourceGenerators/SourceGenerators.CsMarkupApiSourceGenerator/UnoWinUI.NET7_0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Start of generated C# Markup API for Uno.WinUI
2-
#if NET7_0 && HAS_UNO && !WINDOWS_UWP
2+
#if NET7_0 && __WASM_OR_SKIA__
33

44
using System;
55
using System.Collections.Generic;

src/CSharpMarkup.WinUI.LiveChartsCore.SkiaSharpView/Generated/SourceGenerators/SourceGenerators.CsMarkupApiSourceGenerator/UnoWinUI.NET7_0_ANDROID.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Start of generated C# Markup API for Uno.WinUI
2-
#if NET7_0_ANDROID && HAS_UNO && !WINDOWS_UWP
2+
#if NET7_0_ANDROID && __ANDROID__
33

44
using System;
55
using System.Collections.Generic;

src/CSharpMarkup.WinUI.LiveChartsCore.SkiaSharpView/Generated/SourceGenerators/SourceGenerators.CsMarkupApiSourceGenerator/UnoWinUI.NET7_0_IOS.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Start of generated C# Markup API for Uno.WinUI
2-
#if NET7_0_IOS && HAS_UNO && !WINDOWS_UWP
2+
#if NET7_0_IOS && __IOS__ && !__MACCATALYST__
33

44
using System;
55
using System.Collections.Generic;

src/CSharpMarkup.WinUI.LiveChartsCore.SkiaSharpView/Generated/SourceGenerators/SourceGenerators.CsMarkupApiSourceGenerator/UnoWinUI.NET7_0_MACCATALYST.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Start of generated C# Markup API for Uno.WinUI
2-
#if NET7_0_MACCATALYST && HAS_UNO && !WINDOWS_UWP
2+
#if NET7_0_MACCATALYST && __MACCATALYST__
33

44
using System;
55
using System.Collections.Generic;

src/CSharpMarkup.WinUI.LiveChartsCore.SkiaSharpView/Generated/SourceGenerators/SourceGenerators.CsMarkupApiSourceGenerator/UnoWinUI.NET7_0_MACOS.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Start of generated C# Markup API for Uno.WinUI
2-
#if NET7_0_MACOS && HAS_UNO && !WINDOWS_UWP
2+
#if NET7_0_MACOS && __MACOS__
33

44
using System;
55
using System.Collections.Generic;

src/CSharpMarkup.WinUI.LiveChartsCore.SkiaSharpView/Generated/SourceGenerators/SourceGenerators.CsMarkupApiSourceGenerator/WinUI.NET7_0_WINDOWS10_0_19041.cs

Lines changed: 27 additions & 27 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "7.0.402"
3+
"version": "8.0.100-rc.2.23502.2"
44
//"rollForward": "latestFeature"
55
}
66
}

src/CSharpMarkup.WinUI.Uno.Extensions.Navigation.Toolkit/CSharpMarkup.WinUI.Uno.Extensions.Navigation.Toolkit.csproj

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
<PropertyGroup>
33
<Configurations>Debug;Release;Generate</Configurations>
44
<IsUno>true</IsUno>
5+
6+
<!-- Workaround for PRI resource build errors and dotnet build support, from https://github.com/dotnet/maui/issues/5886#issuecomment-1123106200 -->
7+
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
8+
<GenerateLibraryLayout>true</GenerateLibraryLayout>
59
</PropertyGroup>
610

711
<PropertyGroup>
@@ -40,37 +44,14 @@
4044
</PropertyGroup>
4145

4246
<PropertyGroup>
43-
<TargetFrameworks>net7.0-windows10.0.19041;net7.0;net7.0-android;net7.0-ios;net7.0-maccatalyst;net7.0-macos</TargetFrameworks>
47+
<TargetFrameworks>$(CSharpMarkupWinUINet7TargetFrameworks)</TargetFrameworks>
4448
<RootNamespace>CSharpMarkup.WinUI.Uno.Extensions.Navigation.Toolkit</RootNamespace>
4549
</PropertyGroup>
4650

47-
<PropertyGroup Condition="$(TargetFramework.Contains('windows10.'))">
48-
<IsUno>false</IsUno>
49-
50-
<DefineConstants>$(DefineConstants);WINUI</DefineConstants>
51-
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
52-
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
51+
<PropertyGroup Condition="$(IsUno)==false">
5352
<UseWinUI>true</UseWinUI>
54-
<WindowsAppSDKWinUI>true</WindowsAppSDKWinUI> <!-- Workaround for https://github.com/unoplatform/uno/discussions/13569 -->
55-
</PropertyGroup>
56-
57-
<PropertyGroup Condition="$(IsUno)">
58-
<DefineConstants>$(DefineConstants);HAS_UNO</DefineConstants>
59-
</PropertyGroup>
60-
61-
<PropertyGroup Condition=" '$(Configuration)' == 'Generate' ">
62-
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
63-
<CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>
6453
</PropertyGroup>
6554

66-
<ItemGroup Condition=" '$(Configuration)' == 'Generate' ">
67-
<Compile Remove="$(CompilerGeneratedFilesOutputPath)/*/**/*.cs" />
68-
</ItemGroup>
69-
70-
<ItemGroup>
71-
<Compile Remove="Generated/Uno.*/**/*.cs" />
72-
</ItemGroup>
73-
7455
<ItemGroup Condition="$(IsUno)==false">
7556
<PackageReference Include="Microsoft.WindowsAppSDK" ExcludeAssets="build;analyzers;buildTransitive" />
7657
</ItemGroup>

src/CSharpMarkup.WinUI.Uno.Extensions.Navigation.Toolkit/Generated/SourceGenerators/SourceGenerators.CsMarkupApiSourceGenerator/UnoWinUI.NET7_0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Start of generated C# Markup API for Uno.WinUI
2-
#if NET7_0 && HAS_UNO && !WINDOWS_UWP
2+
#if NET7_0 && __WASM_OR_SKIA__
33

44
using System;
55
using System.Collections.Generic;

0 commit comments

Comments
 (0)