From fb5f508137118c6b8c9786942d53203fbd394bce Mon Sep 17 00:00:00 2001
From: LuisAlfredo92 <92luisalfredo@protonmail.com>
Date: Tue, 5 Nov 2024 12:41:00 -0600
Subject: [PATCH 1/2] fix(sdk): Adding MAUI and C# markup packages when enabled
Adding MAUI and C# Markup packages when they are selected in templates. Also, found a probable typo that could cause the original problem
refs: #18700
---
...no.Extensions.Implicit.Packages.ProjectSystem.targets | 2 +-
.../targets/Uno.Implicit.Packages.ProjectSystem.targets | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/Uno.Sdk/targets/Uno.Extensions.Implicit.Packages.ProjectSystem.targets b/src/Uno.Sdk/targets/Uno.Extensions.Implicit.Packages.ProjectSystem.targets
index 2e18938cfc30..4be6b6998e2a 100644
--- a/src/Uno.Sdk/targets/Uno.Extensions.Implicit.Packages.ProjectSystem.targets
+++ b/src/Uno.Sdk/targets/Uno.Extensions.Implicit.Packages.ProjectSystem.targets
@@ -50,7 +50,7 @@
<_UnoProjectSystemPackageReference Include="Uno.Extensions.Maui.WinUI" ProjectSystem="true" />
- <_UnoProjectSystemPackageReference Include="Uno.Extensions.Maui.WinUI.Markup" ProjectSystem="true" Condition="$(UnoFeatures.Contains('CSharpMarkup'))" />
+ <_UnoProjectSystemPackageReference Include="Uno.Extensions.Maui.WinUI.Markup" ProjectSystem="true" Condition="$(UnoFeatures.Contains(';csharpmarkup;'))" />
<_UnoProjectSystemPackageReference Include="Microsoft.Maui.Controls" ProjectSystem="true" />
<_UnoProjectSystemPackageReference Include="Microsoft.Maui.Controls.Compatibility" ProjectSystem="true" />
<_UnoProjectSystemPackageReference Include="Microsoft.Maui.Graphics" ProjectSystem="true" />
diff --git a/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets b/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets
index 6c9e0a81f315..3dcc73bc41e6 100644
--- a/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets
+++ b/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets
@@ -49,6 +49,15 @@
<_UnoProjectSystemPackageReference Include="Uno.Extensions.Markup.Generators" ProjectSystem="true" />
+
+ <_UnoProjectSystemPackageReference Include="Uno.Extensions.Maui.WinUI" ProjectSystem="true" />
+ <_UnoProjectSystemPackageReference Include="Uno.Extensions.Maui.WinUI.Markup" ProjectSystem="true" Condition="$(UnoFeatures.Contains(';csharpmarkup;'))" />
+ <_UnoProjectSystemPackageReference Include="Microsoft.Maui.Controls" ProjectSystem="true" />
+ <_UnoProjectSystemPackageReference Include="Microsoft.Maui.Controls.Compatibility" ProjectSystem="true" />
+ <_UnoProjectSystemPackageReference Include="Microsoft.Maui.Graphics" ProjectSystem="true" />
+ <_UnoProjectSystemPackageReference Include="Microsoft.Maui.Controls.Build.Tasks" ProjectSystem="true" Condition="$(SingleProject) == 'true'"/>
+
+
<_UnoProjectSystemPackageReference Include="Uno.Toolkit.WinUI" ProjectSystem="true" />
<_UnoProjectSystemPackageReference Include="Uno.Toolkit.WinUI.Markup" ProjectSystem="true" Condition="$(UnoFeatures.Contains(';csharpmarkup;'))" />
From 039705045954b1ae954c87e2696d1abead53c35b Mon Sep 17 00:00:00 2001
From: LuisAlfredo92 <92luisalfredo@protonmail.com>
Date: Fri, 8 Nov 2024 14:08:39 -0600
Subject: [PATCH 2/2] fix(sdk): Removing redundant packages
---
.../targets/Uno.Implicit.Packages.ProjectSystem.targets | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets b/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets
index 3dcc73bc41e6..6c9e0a81f315 100644
--- a/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets
+++ b/src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets
@@ -49,15 +49,6 @@
<_UnoProjectSystemPackageReference Include="Uno.Extensions.Markup.Generators" ProjectSystem="true" />
-
- <_UnoProjectSystemPackageReference Include="Uno.Extensions.Maui.WinUI" ProjectSystem="true" />
- <_UnoProjectSystemPackageReference Include="Uno.Extensions.Maui.WinUI.Markup" ProjectSystem="true" Condition="$(UnoFeatures.Contains(';csharpmarkup;'))" />
- <_UnoProjectSystemPackageReference Include="Microsoft.Maui.Controls" ProjectSystem="true" />
- <_UnoProjectSystemPackageReference Include="Microsoft.Maui.Controls.Compatibility" ProjectSystem="true" />
- <_UnoProjectSystemPackageReference Include="Microsoft.Maui.Graphics" ProjectSystem="true" />
- <_UnoProjectSystemPackageReference Include="Microsoft.Maui.Controls.Build.Tasks" ProjectSystem="true" Condition="$(SingleProject) == 'true'"/>
-
-
<_UnoProjectSystemPackageReference Include="Uno.Toolkit.WinUI" ProjectSystem="true" />
<_UnoProjectSystemPackageReference Include="Uno.Toolkit.WinUI.Markup" ProjectSystem="true" Condition="$(UnoFeatures.Contains(';csharpmarkup;'))" />