From 7779a6de03935e80124f6d0bd47de9a36976d4cc Mon Sep 17 00:00:00 2001 From: Yexuan Xiao Date: Fri, 11 Sep 2026 10:27:06 +0800 Subject: [PATCH 1/2] Fix the issue where #include "pch.h" is always being generated --- nuget/Microsoft.Windows.CppWinRT.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuget/Microsoft.Windows.CppWinRT.targets b/nuget/Microsoft.Windows.CppWinRT.targets index a297258f3..13d180ee3 100644 --- a/nuget/Microsoft.Windows.CppWinRT.targets +++ b/nuget/Microsoft.Windows.CppWinRT.targets @@ -447,7 +447,7 @@ namespace $(RootNamespace) - <_PCH>@(ClCompile->Metadata('PrecompiledHeaderFile')->Distinct()) + <_PCH Condition="'%(CLCompile.PrecompiledHeader)' != 'NotUsing'">@(ClCompile->Metadata('PrecompiledHeaderFile')->Distinct()) #include "$(_PCH)" // This file is generated by the build to support Xaml apps From 570dbf8755e5d14eadb7592998d9bdb4985bbc16 Mon Sep 17 00:00:00 2001 From: Yexuan Xiao Date: Fri, 11 Sep 2026 10:40:22 +0800 Subject: [PATCH 2/2] Remove a redundant space --- nuget/Microsoft.Windows.CppWinRT.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuget/Microsoft.Windows.CppWinRT.targets b/nuget/Microsoft.Windows.CppWinRT.targets index 13d180ee3..3d1328f64 100644 --- a/nuget/Microsoft.Windows.CppWinRT.targets +++ b/nuget/Microsoft.Windows.CppWinRT.targets @@ -447,7 +447,7 @@ namespace $(RootNamespace) - <_PCH Condition="'%(CLCompile.PrecompiledHeader)' != 'NotUsing'">@(ClCompile->Metadata('PrecompiledHeaderFile')->Distinct()) + <_PCH Condition="'%(CLCompile.PrecompiledHeader)' != 'NotUsing'">@(ClCompile->Metadata('PrecompiledHeaderFile')->Distinct()) #include "$(_PCH)" // This file is generated by the build to support Xaml apps