commit a31f773cb0de74d17aea6048f94670d51fcd0694 parent 9557d36f6e7e2c141b2372817eb0f76a18230548 Author: Flor Chacón <14323496+florelis@users.noreply.github.com> Date: Fri, 2 May 2025 11:13:27 -0700 Update sample projects to 1.10.340 (#5427) This updates the sample projects for consuming our nuget packages to use v1.10.340. For the winget out-of-proc package, we can now remove the manual references from the project files because the package now has a targets file. For the configuration in-proc package, I'm not updating the version because we stopped publishing it. ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/5427) Diffstat:
8 files changed, 27 insertions(+), 46 deletions(-)
diff --git a/samples/MinimalCallers/C#/Configuration-OutOfProc/C#_Configuration_OutOfProc.csproj b/samples/MinimalCallers/C#/Configuration-OutOfProc/C#_Configuration_OutOfProc.csproj @@ -10,12 +10,12 @@ </PropertyGroup> <ItemGroup> - <PackageReference Include="Microsoft.WindowsPackageManager.Configuration.OutOfProc" Version="1.9.25180" GeneratePathProperty="True" /> + <PackageReference Include="Microsoft.WindowsPackageManager.Configuration.OutOfProc" Version="1.10.340" GeneratePathProperty="True" /> </ItemGroup> <ItemGroup> - <Content Include="$(PkgMicrosoft_WindowsPackageManager_Configuration_OutOfProc)\runtimes\win10-$(Platform)\native\Microsoft.Management.Configuration.dll" Link="Microsoft.Management.Configuration.dll" CopyToOutputDirectory="PreserveNewest" /> - <Content Include="$(PkgMicrosoft_WindowsPackageManager_Configuration_OutOfProc)\runtimes\win10-$(Platform)\native\Microsoft.Management.Configuration.winmd" Link="Microsoft.Management.Configuration.winmd" CopyToOutputDirectory="PreserveNewest" /> + <Content Include="$(PkgMicrosoft_WindowsPackageManager_Configuration_OutOfProc)\runtimes\win-$(Platform)\native\Microsoft.Management.Configuration.dll" Link="Microsoft.Management.Configuration.dll" CopyToOutputDirectory="PreserveNewest" /> + <Content Include="$(PkgMicrosoft_WindowsPackageManager_Configuration_OutOfProc)\runtimes\win-$(Platform)\native\Microsoft.Management.Configuration.winmd" Link="Microsoft.Management.Configuration.winmd" CopyToOutputDirectory="PreserveNewest" /> </ItemGroup> </Project> diff --git a/samples/MinimalCallers/C#/WinGet-InProc/C#_WinGet_InProc.csproj b/samples/MinimalCallers/C#/WinGet-InProc/C#_WinGet_InProc.csproj @@ -11,7 +11,7 @@ <ItemGroup> <PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.2.0" /> - <PackageReference Include="Microsoft.WindowsPackageManager.InProcCom" Version="1.9.25180"> + <PackageReference Include="Microsoft.WindowsPackageManager.InProcCom" Version="1.10.340"> <!-- NU1701: The package targets .NET Framework, but this uses .NET --> <NoWarn>NU1701</NoWarn> <GeneratePathProperty>true</GeneratePathProperty> diff --git a/samples/MinimalCallers/C#/WinGet-OutOfProc/C#_WinGet_OutOfProc.csproj b/samples/MinimalCallers/C#/WinGet-OutOfProc/C#_WinGet_OutOfProc.csproj @@ -7,33 +7,14 @@ <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> <Platforms>x64;ARM64;x86</Platforms> - </PropertyGroup> - - <ItemGroup> - <PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.2.0" /> - <PackageReference Include="Microsoft.WindowsPackageManager.ComInterop" Version="1.9.25180"> - <!-- NU1701: The package targets .NET Framework, but this uses .NET --> - <NoWarn>NU1701</NoWarn> - <GeneratePathProperty>true</GeneratePathProperty> - <IncludeAssets>none</IncludeAssets> - </PackageReference> - </ItemGroup> - <!-- Tell CsWinRT to create the projection for the API --> - <PropertyGroup> - <CsWinRTWindowsMetadata>10.0.19041.0</CsWinRTWindowsMetadata> - <CsWinRTIncludes>Microsoft.Management.Deployment</CsWinRTIncludes> + <!-- Use one of static, dynamic, none --> + <MicrosoftManagementDeployment-FactoryLinkage>static</MicrosoftManagementDeployment-FactoryLinkage> </PropertyGroup> - <ItemGroup> - <CsWinRTInputs Include="$(PkgMicrosoft_WindowsPackageManager_ComInterop)\lib\Microsoft.Management.Deployment.winmd" /> - </ItemGroup> - <!-- Reference and include necessary binaries --> <ItemGroup> - <Content Include="$(PkgMicrosoft_WindowsPackageManager_ComInterop)\lib\Microsoft.Management.Deployment.winmd" Link="Microsoft.Management.Deployment.winmd" CopyToOutputDirectory="PreserveNewest" /> - <Content Include="$(PkgMicrosoft_WindowsPackageManager_ComInterop)\runtimes\win10-$(Platform)\native\winrtact.dll" Link="winrtact.dll" CopyToOutputDirectory="PreserveNewest" /> - <!-- Replace 'dynamic' with 'static' to use binaries compiled with static linking --> - <Content Include="$(PkgMicrosoft_WindowsPackageManager_ComInterop)\bin\win10-$(Platform)\native\dynamic\Microsoft.Management.Deployment.dll" Link="Microsoft.Management.Deployment.dll" CopyToOutputDirectory="PreserveNewest" /> + <PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.2.0" /> + <PackageReference Include="Microsoft.WindowsPackageManager.ComInterop" Version="1.10.340" /> </ItemGroup> </Project> diff --git a/samples/MinimalCallers/C++/WinGet-InProc/WinGet-InProc.vcxproj b/samples/MinimalCallers/C++/WinGet-InProc/WinGet-InProc.vcxproj @@ -99,7 +99,7 @@ <!-- Reference the .winmd so that it can be processed by CppWinRT --> <ItemGroup> <Reference Include="Microsoft.Management.Deployment"> - <HintPath>..\..\packages\Microsoft.WindowsPackageManager.InProcCom.1.9.25180\lib\Microsoft.Management.Deployment.winmd</HintPath> + <HintPath>..\..\packages\Microsoft.WindowsPackageManager.InProcCom.1.10.340\lib\Microsoft.Management.Deployment.winmd</HintPath> <IsWinMDFile>true</IsWinMDFile> </Reference> </ItemGroup> diff --git a/samples/MinimalCallers/C++/WinGet-InProc/packages.config b/samples/MinimalCallers/C++/WinGet-InProc/packages.config @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" /> - <package id="Microsoft.WindowsPackageManager.InProcCom" version="1.9.25180" targetFramework="native" /> + <package id="Microsoft.WindowsPackageManager.InProcCom" version="1.10.340" targetFramework="native" /> </packages> \ No newline at end of file diff --git a/samples/MinimalCallers/C++/WinGet-OutOfProc/WinGet-OutOfProc.vcxproj b/samples/MinimalCallers/C++/WinGet-OutOfProc/WinGet-OutOfProc.vcxproj @@ -96,27 +96,14 @@ <ItemGroup> <None Include="packages.config" /> </ItemGroup> - <!-- Reference and include necessary binaries --> <PropertyGroup> - <WinGetNuGetPlatform Condition="'$(Platform)' == 'Win32'">x86</WinGetNuGetPlatform> - <WinGetNuGetPlatform Condition="'$(Platform)' != 'Win32'">$(Platform)</WinGetNuGetPlatform> + <!-- Use one of static, dynamic, none --> + <MicrosoftManagementDeployment-FactoryLinkage>static</MicrosoftManagementDeployment-FactoryLinkage> </PropertyGroup> - <ItemGroup> - <WindowsMetadataReference Include="..\..\packages\Microsoft.WindowsPackageManager.ComInterop.1.9.25180\lib\Microsoft.Management.Deployment.winmd" /> - <Reference Include="..\..\packages\Microsoft.WindowsPackageManager.ComInterop.1.9.25180\lib\Microsoft.Management.Deployment.winmd"> - <Implementation>Microsoft.Management.Deployment.dll</Implementation> - </Reference> - <ReferenceCopyLocalPaths Include="..\..\packages\Microsoft.WindowsPackageManager.ComInterop.1.9.25180\lib\Microsoft.Management.Deployment.winmd"> - <Implementation>Microsoft.Management.Deployment.dll</Implementation> - <IsOutOfProcess>true</IsOutOfProcess> - </ReferenceCopyLocalPaths> - <!-- Replace 'dynamic' with 'static' to use binaries compiled with static linking --> - <ReferenceCopyLocalPaths Include="..\..\packages\Microsoft.WindowsPackageManager.ComInterop.1.9.25180\bin\win10-$(WinGetNuGetPlatform)\native\dynamic\Microsoft.Management.Deployment.dll" /> - <ReferenceCopyLocalPaths Include="..\..\packages\Microsoft.WindowsPackageManager.ComInterop.1.9.25180\runtimes\win10-$(WinGetNuGetPlatform)\native\winrtact.dll" /> - </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> <Import Project="..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" /> + <Import Project="..\..\packages\Microsoft.WindowsPackageManager.ComInterop.1.10.340\build\native\Microsoft.WindowsPackageManager.ComInterop.targets" Condition="Exists('..\..\packages\Microsoft.WindowsPackageManager.ComInterop.1.10.340\build\native\Microsoft.WindowsPackageManager.ComInterop.targets')" /> </ImportGroup> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <PropertyGroup> @@ -124,5 +111,6 @@ </PropertyGroup> <Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.props'))" /> <Error Condition="!Exists('..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Windows.CppWinRT.2.0.240405.15\build\native\Microsoft.Windows.CppWinRT.targets'))" /> + <Error Condition="!Exists('..\..\packages\Microsoft.WindowsPackageManager.ComInterop.1.10.340\build\native\Microsoft.WindowsPackageManager.ComInterop.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.WindowsPackageManager.ComInterop.1.10.340\build\native\Microsoft.WindowsPackageManager.ComInterop.targets'))" /> </Target> </Project> \ No newline at end of file diff --git a/samples/MinimalCallers/C++/WinGet-OutOfProc/packages.config b/samples/MinimalCallers/C++/WinGet-OutOfProc/packages.config @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="Microsoft.Windows.CppWinRT" version="2.0.240405.15" targetFramework="native" /> - <package id="Microsoft.WindowsPackageManager.ComInterop" version="1.9.25180" targetFramework="native" /> + <package id="Microsoft.WindowsPackageManager.ComInterop" version="1.10.340" targetFramework="native" /> </packages> \ No newline at end of file diff --git a/samples/MinimalCallers/MinimalCallers.sln b/samples/MinimalCallers/MinimalCallers.sln @@ -47,11 +47,17 @@ Global {A7CC8A07-02FC-4035-848F-1EBECCCE9C07}.Release|x86.ActiveCfg = Release|x86 {A7CC8A07-02FC-4035-848F-1EBECCCE9C07}.Release|x86.Build.0 = Release|x86 {DD80F640-5071-4200-9BDE-620FBDFF1725}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {DD80F640-5071-4200-9BDE-620FBDFF1725}.Debug|ARM64.Build.0 = Debug|ARM64 {DD80F640-5071-4200-9BDE-620FBDFF1725}.Debug|x64.ActiveCfg = Debug|x64 + {DD80F640-5071-4200-9BDE-620FBDFF1725}.Debug|x64.Build.0 = Debug|x64 {DD80F640-5071-4200-9BDE-620FBDFF1725}.Debug|x86.ActiveCfg = Debug|x86 + {DD80F640-5071-4200-9BDE-620FBDFF1725}.Debug|x86.Build.0 = Debug|x86 {DD80F640-5071-4200-9BDE-620FBDFF1725}.Release|ARM64.ActiveCfg = Release|ARM64 + {DD80F640-5071-4200-9BDE-620FBDFF1725}.Release|ARM64.Build.0 = Release|ARM64 {DD80F640-5071-4200-9BDE-620FBDFF1725}.Release|x64.ActiveCfg = Release|x64 + {DD80F640-5071-4200-9BDE-620FBDFF1725}.Release|x64.Build.0 = Release|x64 {DD80F640-5071-4200-9BDE-620FBDFF1725}.Release|x86.ActiveCfg = Release|x86 + {DD80F640-5071-4200-9BDE-620FBDFF1725}.Release|x86.Build.0 = Release|x86 {B44C18DE-FE76-4D30-B740-25A5AD99257F}.Debug|ARM64.ActiveCfg = Debug|ARM64 {B44C18DE-FE76-4D30-B740-25A5AD99257F}.Debug|ARM64.Build.0 = Debug|ARM64 {B44C18DE-FE76-4D30-B740-25A5AD99257F}.Debug|x64.ActiveCfg = Debug|x64 @@ -77,11 +83,17 @@ Global {93B5C28B-04AC-4B35-9253-81C1405D9A72}.Release|x86.ActiveCfg = Release|x86 {93B5C28B-04AC-4B35-9253-81C1405D9A72}.Release|x86.Build.0 = Release|x86 {925454B7-A3FA-40C9-806A-4B64D5764157}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {925454B7-A3FA-40C9-806A-4B64D5764157}.Debug|ARM64.Build.0 = Debug|ARM64 {925454B7-A3FA-40C9-806A-4B64D5764157}.Debug|x64.ActiveCfg = Debug|x64 + {925454B7-A3FA-40C9-806A-4B64D5764157}.Debug|x64.Build.0 = Debug|x64 {925454B7-A3FA-40C9-806A-4B64D5764157}.Debug|x86.ActiveCfg = Debug|Win32 + {925454B7-A3FA-40C9-806A-4B64D5764157}.Debug|x86.Build.0 = Debug|Win32 {925454B7-A3FA-40C9-806A-4B64D5764157}.Release|ARM64.ActiveCfg = Release|ARM64 + {925454B7-A3FA-40C9-806A-4B64D5764157}.Release|ARM64.Build.0 = Release|ARM64 {925454B7-A3FA-40C9-806A-4B64D5764157}.Release|x64.ActiveCfg = Release|x64 + {925454B7-A3FA-40C9-806A-4B64D5764157}.Release|x64.Build.0 = Release|x64 {925454B7-A3FA-40C9-806A-4B64D5764157}.Release|x86.ActiveCfg = Release|Win32 + {925454B7-A3FA-40C9-806A-4B64D5764157}.Release|x86.Build.0 = Release|Win32 {01CB5485-D1F3-421F-8E8A-7BC04B9CA037}.Debug|ARM64.ActiveCfg = Debug|ARM64 {01CB5485-D1F3-421F-8E8A-7BC04B9CA037}.Debug|ARM64.Build.0 = Debug|ARM64 {01CB5485-D1F3-421F-8E8A-7BC04B9CA037}.Debug|x64.ActiveCfg = Debug|x64