Skip to content

Commit 9094d6e

Browse files
authored
Fix unquoted properties in vcxproj conditions (#263)
This PR fixes several instances of improper quoting within the Conditions of ReactNativeXaml.vcxproj.
1 parent 903cefa commit 9094d6e

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix unquoted properties in vcxproj conditions",
4+
"packageName": "react-native-xaml",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

package/windows/ReactNativeXaml/ReactNativeXaml.vcxproj

+14-14
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\external\Microsoft.ReactNative.Uwp.CppLib.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.props')" />
99
</ImportGroup>
1010
<PropertyGroup>
11-
<RnwUsesPackageReference Condition="$(RnwUsesPackageReference)=='' And $(ReactNativeWindowsVersion)!='' And $([MSBuild]::VersionGreaterThanOrEquals('$(ReactNativeWindowsVersion)', '0.68.0'))">true</RnwUsesPackageReference>
11+
<RnwUsesPackageReference Condition="'$(RnwUsesPackageReference)'=='' And '$(ReactNativeWindowsVersion)'!='' And $([MSBuild]::VersionGreaterThanOrEquals('$(ReactNativeWindowsVersion)', '0.68.0'))">true</RnwUsesPackageReference>
1212
<!-- CODESYNC: Keep this version in sync with the WinUI2xVersion version used by the RNW version targeted by RNX's devDependency. -->
1313
<DefaultWinUIVersion>2.8.0</DefaultWinUIVersion>
1414
</PropertyGroup>
1515
<PropertyGroup>
1616
<CppWinRTVersion Condition="'$(CppWinRTVersion)'=='' Or $([MSBuild]::VersionLessThan('$(CppWinRTVersion)', '2.0.210312.4'))">2.0.210312.4</CppWinRTVersion>
1717
</PropertyGroup>
18-
<Import Project="$(SolutionDir)\packages\$(WinUIPackageProps)" Condition="$(RnwUsesPackageReference)!='true' And '$(OverrideWinUIPackage)'!='true' And '$(WinUIPackageProps)'!='' And Exists('$(SolutionDir)\packages\$(WinUIPackageProps)')" />
19-
<Import Project="$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.$(CppWinRTVersion)\build\native\Microsoft.Windows.CppWinRT.props" Condition="$(RnwUsesPackageReference)!='true' And Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.$(CppWinRTVersion)\build\native\Microsoft.Windows.CppWinRT.props')" />
18+
<Import Project="$(SolutionDir)\packages\$(WinUIPackageProps)" Condition="'$(RnwUsesPackageReference)'!='true' And '$(OverrideWinUIPackage)'!='true' And '$(WinUIPackageProps)'!='' And Exists('$(SolutionDir)\packages\$(WinUIPackageProps)')" />
19+
<Import Project="$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.$(CppWinRTVersion)\build\native\Microsoft.Windows.CppWinRT.props" Condition="'$(RnwUsesPackageReference)'!='true' And Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.$(CppWinRTVersion)\build\native\Microsoft.Windows.CppWinRT.props')" />
2020
<PropertyGroup Label="Globals">
2121
<CppWinRTOptimized>true</CppWinRTOptimized>
2222
<CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
@@ -251,7 +251,7 @@
251251
</ItemGroup>
252252
<Import Project="$(SolutionDir)\ReactNativeXaml.Imports.props" Condition="Exists('$(SolutionDir)\ReactNativeXaml.Imports.props')" />
253253
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
254-
<ItemGroup Condition="$(RnwUsesPackageReference)=='true'">
254+
<ItemGroup Condition="'$(RnwUsesPackageReference)'=='true'">
255255
<PackageReference Include="CDebug" Version="0.0.3" />
256256
<PackageReference Include="Microsoft.Windows.CppWinRT" Version="$(CppWinRTVersion)" PrivateAssets="all" />
257257
</ItemGroup>
@@ -267,28 +267,28 @@
267267
</Target>
268268
<PropertyGroup Label="ReactNativeXamlCodeGenProps">
269269
<!-- RunReactNativeXamlCodeGenBeforeBuild defaults to false to speed up build times, unless the version of WinUI targeted doesn't match the version checked-in to the code-gen. -->
270-
<RunReactNativeXamlCodeGenBeforeBuild Condition="$(RunReactNativeXamlCodeGenBeforeBuild)=='' And '$(WinUIPackageVersion)'!='$(DefaultWinUIVersion)'">true</RunReactNativeXamlCodeGenBeforeBuild>
271-
<RunReactNativeXamlCodeGenBeforeBuild Condition="$(RunReactNativeXamlCodeGenBeforeBuild)==''">false</RunReactNativeXamlCodeGenBeforeBuild>
272-
<ReactNativeXamlTargetWinMD Condition="$(ReactNativeXamlTargetWinMD)=='' And $(RnwUsesPackageReference)=='true' And Exists('$(NuGetPackageRoot)\$(WinUIPackageName)\$(WinUIPackageVersion)\lib\uap10.0\Microsoft.UI.Xaml.winmd')">$(NuGetPackageRoot)\$(WinUIPackageName)\$(WinUIPackageVersion)\lib\uap10.0\Microsoft.UI.Xaml.winmd</ReactNativeXamlTargetWinMD>
273-
<ReactNativeXamlTargetWinMD Condition="$(ReactNativeXamlTargetWinMD)=='' And $(RnwUsesPackageReference)!='true' And Exists('$(SolutionDir)\packages\$(WinUIPackageName).$(WinUIPackageVersion)\lib\uap10.0\Microsoft.UI.Xaml.winmd')">$(SolutionDir)\packages\$(WinUIPackageName).$(WinUIPackageVersion)\lib\uap10.0\Microsoft.UI.Xaml.winmd</ReactNativeXamlTargetWinMD>
274-
<ReactNativeXamlRootDir Condition="$(ReactNativeXamlRootDir)==''">$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)..\..\'))</ReactNativeXamlRootDir>
270+
<RunReactNativeXamlCodeGenBeforeBuild Condition="'$(RunReactNativeXamlCodeGenBeforeBuild)'=='' And '$(WinUIPackageVersion)'!='$(DefaultWinUIVersion)'">true</RunReactNativeXamlCodeGenBeforeBuild>
271+
<RunReactNativeXamlCodeGenBeforeBuild Condition="'$(RunReactNativeXamlCodeGenBeforeBuild)'==''">false</RunReactNativeXamlCodeGenBeforeBuild>
272+
<ReactNativeXamlTargetWinMD Condition="'$(ReactNativeXamlTargetWinMD)'=='' And '$(RnwUsesPackageReference)'=='true' And Exists('$(NuGetPackageRoot)\$(WinUIPackageName)\$(WinUIPackageVersion)\lib\uap10.0\Microsoft.UI.Xaml.winmd')">$(NuGetPackageRoot)\$(WinUIPackageName)\$(WinUIPackageVersion)\lib\uap10.0\Microsoft.UI.Xaml.winmd</ReactNativeXamlTargetWinMD>
273+
<ReactNativeXamlTargetWinMD Condition="'$(ReactNativeXamlTargetWinMD)'=='' And '$(RnwUsesPackageReference)'!='true' And Exists('$(SolutionDir)\packages\$(WinUIPackageName).$(WinUIPackageVersion)\lib\uap10.0\Microsoft.UI.Xaml.winmd')">$(SolutionDir)\packages\$(WinUIPackageName).$(WinUIPackageVersion)\lib\uap10.0\Microsoft.UI.Xaml.winmd</ReactNativeXamlTargetWinMD>
274+
<ReactNativeXamlRootDir Condition="'$(ReactNativeXamlRootDir)'==''">$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)..\..\'))</ReactNativeXamlRootDir>
275275
<ReactNativeXamlCodeGenCommandDir Condition="'$(ReactNativeXamlCodeGenCommandDir)'==''">$(ReactNativeXamlRootDir)</ReactNativeXamlCodeGenCommandDir>
276-
<ReactNativeXamlCodeGenCommand Condition="$(ReactNativeXamlCodeGenCommand)==''">dotnet run --project Codegen -verbose -winmd $(ReactNativeXamlTargetWinMD)</ReactNativeXamlCodeGenCommand>
276+
<ReactNativeXamlCodeGenCommand Condition="'$(ReactNativeXamlCodeGenCommand)'==''">dotnet run --project Codegen -verbose -winmd $(ReactNativeXamlTargetWinMD)</ReactNativeXamlCodeGenCommand>
277277
<ReactNativeXamlYarnBuildCommandDir Condition="'$(ReactNativeXamlYarnBuildCommandDir)'==''">$(SolutionDir)</ReactNativeXamlYarnBuildCommandDir>
278-
<ReactNativeXamlYarnBuildCommand Condition="$(ReactNativeXamlYarnBuildCommand)==''">yarn run tsc --project $(ReactNativeXamlRootDir)</ReactNativeXamlYarnBuildCommand>
278+
<ReactNativeXamlYarnBuildCommand Condition="'$(ReactNativeXamlYarnBuildCommand)'==''">yarn run tsc --project $(ReactNativeXamlRootDir)</ReactNativeXamlYarnBuildCommand>
279279
</PropertyGroup>
280-
<Target Name="RunReactNativeXamlCodeGen" BeforeTargets="PrepareForBuild" Condition="$(RunReactNativeXamlCodeGenBeforeBuild)=='true'">
280+
<Target Name="RunReactNativeXamlCodeGen" BeforeTargets="PrepareForBuild" Condition="'$(RunReactNativeXamlCodeGenBeforeBuild)'=='true'">
281281
<Exec Command="$(ReactNativeXamlCodeGenCommand)" WorkingDirectory="$(ReactNativeXamlCodeGenCommandDir)" CustomWarningRegularExpression="Warning: " CustomErrorRegularExpression="Error: " />
282282
<Exec Command="$(ReactNativeXamlYarnBuildCommand)" WorkingDirectory="$(ReactNativeXamlYarnBuildCommandDir)" CustomWarningRegularExpression="Warning: " CustomErrorRegularExpression="Error: " />
283283
</Target>
284-
<ImportGroup Label="ExtensionTargets" Condition="$(RnwUsesPackageReference)!='true'">
284+
<ImportGroup Label="ExtensionTargets" Condition="'$(RnwUsesPackageReference)'!='true'">
285285
<Import Project="$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.$(CppWinRTVersion)\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)\packages\Microsoft.Windows.CppWinRT.$(CppWinRTVersion)\build\native\Microsoft.Windows.CppWinRT.targets')" />
286286
<Import Project="$(SolutionDir)\packages\CDebug.0.0.3\build\CDebug.targets" Condition="Exists('$(SolutionDir)\packages\CDebug.0.0.3\build\CDebug.targets')" />
287287
<Import Project="$(SolutionDir)\packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets" Condition="'$(OverrideWinUIPackage)'!='true' And Exists('$(SolutionDir)\packages\$(WinUIPackageName).$(WinUIPackageVersion)\build\native\$(WinUIPackageName).targets')" />
288288
<Import Project="$(SolutionDir)\packages\Microsoft.ReactNative.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.targets" Condition="'$(UseExperimentalNuget)'=='true' And Exists('$(SolutionDir)\packages\Microsoft.ReactNative.Cxx.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.Cxx.targets')" />
289289
<Import Project="$(SolutionDir)\packages\Microsoft.ReactNative.Cxx.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.Cxx.targets" Condition="'$(UseExperimentalNuget)'=='true' And Exists('$(SolutionDir)\packages\Microsoft.ReactNative.Cxx.$(ReactNativeWindowsVersion)\build\native\Microsoft.ReactNative.Cxx.targets')" />
290290
</ImportGroup>
291-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild" Condition="$(RnwUsesPackageReference)!='true'">
291+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild" Condition="'$(RnwUsesPackageReference)'!='true'">
292292
<PropertyGroup>
293293
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
294294
</PropertyGroup>

0 commit comments

Comments
 (0)