diff --git a/nuget/Microsoft.Windows.CppWinRT.targets b/nuget/Microsoft.Windows.CppWinRT.targets index 3f1f4fb91..7eb5bd565 100644 --- a/nuget/Microsoft.Windows.CppWinRT.targets +++ b/nuget/Microsoft.Windows.CppWinRT.targets @@ -28,6 +28,8 @@ Copyright (C) Microsoft Corporation. All rights reserved. $(CppWinRTParameters) -fastabi "$(CppWinRTPackageDir)bin\" "$(CppWinRTPackageDir)" + + true C++ Windows.UI.Xaml $(GeneratedFilesDir)XamlMetaDataProvider.idl @@ -38,7 +40,7 @@ Copyright (C) Microsoft Corporation. All rights reserved. $(IntDir)$(MSBuildProjectFile).cppwinrt_plat.rsp $(IntDir)$(MSBuildProjectFile).cppwinrt_ref.rsp $(IntDir)$(MSBuildProjectFile).cppwinrt_comp.rsp - + @@ -75,6 +77,10 @@ Copyright (C) Microsoft Corporation. All rights reserved. GetResolvedWinMD; CppWinRTCopyWinMDToOutputDirectory; + + $(ResolveReferencesDependsOn); + CppWinRTImplicitlyExpandTargetPlatform + $(ResolveAssemblyReferencesDependsOn);GetCppWinRTProjectWinMDReferences;CppWinRTMarkStaticLibrariesPrivate; @@ -135,6 +141,59 @@ Copyright (C) Microsoft Corporation. All rights reserved. + + + + + <_TargetPlatformWinMDs Condition="'$(TargetPlatformWinMDLocation)' != ''" Include="$(TargetPlatformWinMDLocation)\**\*.winmd"> + true + false + $(TargetPlatformMoniker) + $(TargetPlatformDisplayName) + CppWinRTImplicitlyExpandTargetPlatform + True + + <_TargetPlatformWinMDs Condition="'$(TargetPlatformSdkRootOverride)' != '' AND '$(TargetPlatformWinMDLocation)' == ''" Include="$(TargetPlatformSdkRootOverride)\References\$(XeWin10TargetVersion)\**\*.winmd"> + true + false + $(TargetPlatformMoniker) + $(TargetPlatformDisplayName) + CppWinRTImplicitlyExpandTargetPlatform + True + + <_TargetPlatformWinMDs Condition="'$(TargetPlatformSdkRootOverride)' == '' AND '$(TargetPlatformWinMDLocation)' == ''" Include="$(WindowsSDK_MetadataPathVersioned)\**\*.winmd"> + true + false + $(TargetPlatformMoniker) + $(TargetPlatformDisplayName) + CppWinRTImplicitlyExpandTargetPlatform + True + + + + + + + + + + <_ResolveAssemblyReferenceResolvedFiles Include="@(_TargetPlatformWinMDs)" /> + + + <_TargetPlatformWinMDs Remove="@(_TargetPlatformWinMDs)" /> + + + @@ -247,7 +306,9 @@ Copyright (C) Microsoft Corporation. All rights reserved. <_CppWinRTPlatformWinMDReferences Include="@(ReferencePath)" Condition="'%(ReferencePath.IsSystemReference)' == 'true' and '%(ReferencePath.WinMDFile)' == 'true' and '%(ReferencePath.ReferenceSourceTarget)' == 'ResolveAssemblyReference'" /> <_CppWinRTPlatformWinMDReferences Include="@(ReferencePath)" Condition="'%(ReferencePath.IsSystemReference)' == 'true' and '%(ReferencePath.WinMDFile)' == 'true' and '%(ReferencePath.ResolvedFrom)' == 'ImplicitlyExpandTargetPlatform'" /> - <_CppWinRTPlatformWinMDReferences Include="$(CppWinRTSDKReferences)" /> + + <_CppWinRTPlatformWinMDReferences Include="@(ReferencePath)" Condition="'%(ReferencePath.IsSystemReference)' == 'true' and '%(ReferencePath.WinMDFile)' == 'true' and '%(ReferencePath.ResolvedFrom)' == 'CppWinRTImplicitlyExpandTargetPlatform'" /> + <_CppWinRTPlatformWinMDReferences Include="$(CppWinRTSDKReferences)" /> %(FullPath) @@ -527,7 +588,7 @@ $(XamlMetaDataProviderPch) - + @@ -566,11 +627,11 @@ $(XamlMetaDataProviderPch) @@ -583,7 +644,7 @@ $(XamlMetaDataProviderPch) - + - + - @@ -732,7 +793,7 @@ $(XamlMetaDataProviderPch) Lines="$(CppWinRTComponentProjectionDependencyHash)" Overwrite="true" WriteOnlyWhenDifferent="true" /> - + @@ -794,7 +855,7 @@ $(XamlMetaDataProviderPch) - + @@ -826,20 +887,20 @@ $(XamlMetaDataProviderPch) - - %(AdditionalOptions) /bigobj - %(AdditionalOptions) /await - %(AdditionalIncludeDirectories);$(GeneratedFilesDir) - - - $(WindowsSDK_MetadataFoundationPath);%(AdditionalMetadataDirectories) - $(WindowsSDK_MetadataPath);%(AdditionalMetadataDirectories) - %(AdditionalOptions) /nomidl - - - %(AdditionalDependencies);WindowsApp.lib - %(AdditionalDependencies);$(CppWinRTPackageDir)build\native\lib\$(Platform)\cppwinrt_fast_forwarder.lib - + + %(AdditionalOptions) /bigobj + %(AdditionalOptions) /await + %(AdditionalIncludeDirectories);$(GeneratedFilesDir) + + + $(WindowsSDK_MetadataFoundationPath);%(AdditionalMetadataDirectories) + $(WindowsSDK_MetadataPath);%(AdditionalMetadataDirectories) + %(AdditionalOptions) /nomidl + + + %(AdditionalDependencies);WindowsApp.lib + %(AdditionalDependencies);$(CppWinRTPackageDir)build\native\lib\$(Platform)\cppwinrt_fast_forwarder.lib + - + diff --git a/vsix/ProjectTemplates/VC/Windows Desktop/ConsoleApplication/ConsoleApplication.vcxproj b/vsix/ProjectTemplates/VC/Windows Desktop/ConsoleApplication/ConsoleApplication.vcxproj index 66e7c6eaa..6e7a77f72 100644 --- a/vsix/ProjectTemplates/VC/Windows Desktop/ConsoleApplication/ConsoleApplication.vcxproj +++ b/vsix/ProjectTemplates/VC/Windows Desktop/ConsoleApplication/ConsoleApplication.vcxproj @@ -37,7 +37,7 @@ v141 v142 Unicode - + true true