Skip to content

Commit 2e05b07

Browse files
authored
Add switch to disable merge validation to support certain test scenarios (#936)
* Add switch to disable merge validation to support certain test scenarios * made condition explicitly check 'true'
1 parent d9fe8d8 commit 2e05b07

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

nuget/Microsoft.Windows.CppWinRT.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,8 @@ $(XamlMetaDataProviderPch)
561561
</PropertyGroup>
562562
<PropertyGroup>
563563
<!-- mdmerge.exe wants the folders to not have a trailing \ -->
564-
<_MdMergeParameters>-v @(CppWinRTMdMergeMetadataDirectories->'-metadata_dir &quot;%(RelativeDir).&quot;', '&#x0d;&#x0a;')</_MdMergeParameters>
564+
<_MdMergeParameters Condition="'$(CppWinRTMergeNoValidate)'!='true'">-v</_MdMergeParameters>
565+
<_MdMergeParameters>$(_MdMergeParameters) @(CppWinRTMdMergeMetadataDirectories->'-metadata_dir &quot;%(RelativeDir).&quot;', '&#x0d;&#x0a;')</_MdMergeParameters>
565566
<_MdMergeParameters>$(_MdMergeParameters) @(CppWinRTMdMergeInputs->'-i &quot;%(Identity)&quot;', '&#x0d;&#x0a;')</_MdMergeParameters>
566567
<_MdMergeParameters>$(_MdMergeParameters) -o &quot;$(CppWinRTMergedDir.TrimEnd('\'))&quot; -partial $(_MdMergeDepth)</_MdMergeParameters>
567568
</PropertyGroup>

nuget/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ C++/WinRT behavior can be customized with these project properties:
6161
| CppWinRTVerbosity | low \| *normal \| high | Sets the [importance](https://docs.microsoft.com/en-us/visualstudio/msbuild/message-task?view=vs-2017) of C++/WinRT build messages (see below) |
6262
| CppWinRTNamespaceMergeDepth | *1 | Sets the depth of namespace merging (Xaml apps require 1) |
6363
| CppWinRTRootNamespaceAutoMerge | true \| *false | Sets the namespace merge depth to be the length of the root namespace |
64+
| CppWinRTMergeNoValidate | true \| *false | Disables mdmerge validation |
6465
| CppWinRTUsePrefixes | *true \| false | Uses a dotted prefix namespace convention (versus a nested folder convention) |
6566
| CppWinRTPath | ...\cppwinrt.exe | NuGet package-relative path to cppwinrt.exe, for custom build rule invocation |
6667
| CppWinRTParameters | "" | Custom cppwinrt.exe command-line parameters (be sure to append to existing) |

0 commit comments

Comments
 (0)