@@ -29,7 +29,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
2929 <CppWinRTEnableComponentProjection Condition =" '$(CppWinRTEnableComponentProjection)' == ''" >true</CppWinRTEnableComponentProjection >
3030 <CppWinRTEnablePlatformProjection Condition =" '$(CppWinRTEnablePlatformProjection)' == ''" >true</CppWinRTEnablePlatformProjection >
3131 <CppWinRTEnableReferenceProjection Condition =" '$(CppWinRTEnableReferenceProjection)' == ''" >true</CppWinRTEnableReferenceProjection >
32-
32+
3333 <GeneratedFilesDir Condition =" '$(GeneratedFilesDir)' == ''" >$(IntDir)Generated Files\</GeneratedFilesDir >
3434 <!-- Override SDK's uap.props setting to ensure version-matched headers-->
3535 <CppWinRT_IncludePath >$(GeneratedFilesDir)</CppWinRT_IncludePath >
@@ -219,9 +219,11 @@ Copyright (C) Microsoft Corporation. All rights reserved.
219219 <Message Text =" CppWinRTDynamicProjectWinMDReferences: @(CppWinRTDynamicProjectWinMDReferences->'%(WinMDPath)')" Importance =" $(CppWinRTVerbosity)" />
220220 </Target >
221221
222+ <Target Name =" CppWinRTResolveReferences" DependsOnTargets =" GetCppWinRTPlatformWinMDReferences;GetCppWinRTDirectWinMDReferences;GetCppWinRTProjectWinMDReferences;$(CppWinRTResolveReferencesDependsOn)" />
223+
222224 <!-- Calculates the input files and metadata directories to be passed to MdMerge -->
223225 <Target Name =" GetCppWinRTMdMergeInputs"
224- DependsOnTargets =" CppWinRTComputeXamlGeneratedMidlInputs;GetCppWinRTPlatformWinMDReferences;GetCppWinRTDirectWinMDReferences;GetCppWinRTProjectWinMDReferences ;"
226+ DependsOnTargets =" CppWinRTComputeXamlGeneratedMidlInputs;CppWinRTResolveReferences ;"
225227 Returns =" @(CppWinRTMdMergeMetadataDirectories);@(CppWinRTMdMergeInputs)" >
226228 <ItemGroup >
227229 <_MdMergeInputs Remove =" @(_MdMergeInputs)" />
@@ -248,6 +250,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
248250 </Target >
249251
250252 <!-- Adds the XamlMetadataProvider idl to the Midl itemgroup, if building any xaml content -->
253+ <!-- Note that Condition is evaluated before DependsOnTargets are run -->
251254 <Target Name =" CppWinRTComputeXamlGeneratedMidlInputs"
252255 DependsOnTargets =" $(CppWinRTComputeXamlGeneratedMidlInputsDependsOn)"
253256 Condition =" '@(Page)@(ApplicationDefinition)' != '' and '$(XamlLanguage)' == 'CppWinRT' and '$(CppWinRTAddXamlMetaDataProviderIdl)' == 'true'" >
@@ -265,6 +268,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
265268 </Target >
266269
267270 <!-- Adds the XamlMetadataProvider cpp to the ClCompile itemgroup, if building any xaml content -->
271+ <!-- Note that Condition is evaluated before DependsOnTargets are run -->
268272 <Target Name =" CppWinRTComputeXamlGeneratedCompileInputs"
269273 DependsOnTargets =" $(CppWinRTComputeXamlGeneratedCompileInputsDependsOn)"
270274 Condition =" '@(Page)@(ApplicationDefinition)' != '' and '$(XamlLanguage)' == 'CppWinRT' and '$(CppWinRTAddXamlMetaDataProviderIdl)' == 'true'" >
@@ -361,6 +365,9 @@ $(XamlMetaDataProviderPch)
361365 <Message Text =" CppWinRTMidlReferences: @(_MidlReferences->'%(WinMDPath)')" Importance =" $(CppWinRTVerbosity)" />
362366 </Target >
363367
368+ <!-- Ctrl+F7 (selected file) midl compilation support-->
369+ <Target Name =" CppWinRTSetSelectMidlReferences" BeforeTargets =" SelectMidl" DependsOnTargets =" CppWinRTSetMidlReferences" />
370+
364371 <!-- Merge project-generated WinMDs and project-referenced static library WinMDs into project WinMD-->
365372 <Target Name =" CppWinRTMergeProjectWinMDInputs"
366373 DependsOnTargets =" Midl;GetCppWinRTMdMergeInputs;$(CppWinRTMergeProjectWinMDInputsDependsOn)"
@@ -402,6 +409,7 @@ $(XamlMetaDataProviderPch)
402409 </Target >
403410
404411 <!-- Build the platform projection from the winmds that sip with the platform in the Windows SDK -->
412+ <!-- Note that Condition is evaluated before DependsOnTargets are run -->
405413 <Target Name =" CppWinRTMakePlatformProjection"
406414 Condition =" '$(CppWinRTEnablePlatformProjection)' == 'true' AND '$(CppWinRTOverrideSDKReferences)' != 'true'"
407415 DependsOnTargets =" GetCppWinRTPlatformWinMDInputs;$(CppWinRTMakePlatformProjectionDependsOn)"
@@ -431,9 +439,10 @@ $(XamlMetaDataProviderPch)
431439 </Target >
432440
433441 <!-- Build reference projection from WinMD project references and dynamic library project references-->
442+ <!-- Note that Condition is evaluated before DependsOnTargets are run -->
434443 <Target Name =" CppWinRTMakeReferenceProjection"
435444 Condition =" '@(CppWinRTDirectWinMDReferences)@(CppWinRTDynamicProjectWinMDReferences)' != '' AND '$(CppWinRTEnableReferenceProjection)' == 'true'"
436- DependsOnTargets =" GetCppWinRTProjectWinMDReferences;GetCppWinRTPlatformWinMDReferences;GetCppWinRTDirectWinMDReferences; $(CppWinRTMakeReferenceProjectionDependsOn)"
445+ DependsOnTargets =" $(CppWinRTMakeReferenceProjectionDependsOn)"
437446 Inputs =" @(CppWinRTDirectWinMDReferences);@(CppWinRTDynamicProjectWinMDReferences);@(CppWinRTPlatformWinMDReferences)"
438447 Outputs =" $(IntDir)cppwinrt_ref.rsp" >
439448 <PropertyGroup >
@@ -464,9 +473,10 @@ $(XamlMetaDataProviderPch)
464473 </Target >
465474
466475 <!-- Build component projection from project WinMD file and static library project references-->
476+ <!-- Note that Condition is evaluated before DependsOnTargets are run -->
467477 <Target Name =" CppWinRTMakeComponentProjection"
468478 Condition =" '$(CppWinRTEnableComponentProjection)' == 'true'"
469- DependsOnTargets =" GetCppWinRTProjectWinMDReferences;GetCppWinRTPlatformWinMDReferences;GetCppWinRTDirectWinMDReferences; GetCppWinRTMdMergeInputs;$(CppWinRTMakeComponentProjectionDependsOn)"
479+ DependsOnTargets =" GetCppWinRTMdMergeInputs;$(CppWinRTMakeComponentProjectionDependsOn)"
470480 Inputs =" @(CppWinRTMdMergeInputs);@(CppWinRTStaticProjectWinMDReferences)"
471481 Outputs =" $(IntDir)cppwinrt_comp.rsp" >
472482 <PropertyGroup >
@@ -520,7 +530,7 @@ $(XamlMetaDataProviderPch)
520530 <Exec Command =" $(CppWinRTCommand)" Condition =" '@(_CppwinrtCompInputs)' != ''" />
521531 </Target >
522532
523- <Target Name =" CppWinRTMakeProjections" DependsOnTargets =" CppWinRTMakePlatformProjection;CppWinRTMakeReferenceProjection;CppWinRTMakeComponentProjection;$(CppWinRTMakeProjectionsDependsOn)" />
533+ <Target Name =" CppWinRTMakeProjections" DependsOnTargets =" CppWinRTResolveReferences; CppWinRTMakePlatformProjection;CppWinRTMakeReferenceProjection;CppWinRTMakeComponentProjection;$(CppWinRTMakeProjectionsDependsOn)" />
524534
525535 <!-- Add references to all merged project WinMD files for Xaml Compiler-->
526536 <Target Name =" CppWinRTAddXamlReferences"
@@ -530,10 +540,10 @@ $(XamlMetaDataProviderPch)
530540 <XamlReferencesToCompile Include =" $(OutDir)*.winmd" />
531541 </ItemGroup >
532542 </Target >
533-
543+
534544 <!-- Clear merged assembly and set local assembly for Xaml Compiler.
535545 (Note: this can be removed when CppWinRT references are removed from the Xaml targets file.)-->
536- <Target Name =" CppWinRTSetXamlLocalAssembly"
546+ <Target Name =" CppWinRTSetXamlLocalAssembly"
537547 Condition =" '@(Page)@(ApplicationDefinition)' != '' and '$(XamlLanguage)' == 'CppWinRT'"
538548 DependsOnTargets =" $(CppWinRTSetXamlLocalAssemblyDependsOn)" >
539549 <PropertyGroup >
0 commit comments