Skip to content

Commit

Permalink
Convert everything else to net8
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMcPMS committed Dec 17, 2024
1 parent c5c7be4 commit f2c0bff
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 36 deletions.
8 changes: 4 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ jobs:
TargetFolder: '$(artifactsDir)\AppxPackages'

- task: CopyFiles@2
displayName: 'Copy native binaries for Microsoft.WinGet.Client (net6)'
displayName: 'Copy native binaries for Microsoft.WinGet.Client (net8)'
inputs:
SourceFolder: $(buildOutDir)
Contents: |
Microsoft.Management.Deployment.InProc\Microsoft.Management.Deployment.dll
Microsoft.Management.Deployment\Microsoft.Management.Deployment.winmd
WindowsPackageManager\WindowsPackageManager.dll
UndockedRegFreeWinRT\winrtact.dll
TargetFolder: $(buildOutDirAnyCpu)\PowerShell\Microsoft.WinGet.Client\net6.0-windows10.0.22000.0\SharedDependencies\$(BuildPlatform)
TargetFolder: $(buildOutDirAnyCpu)\PowerShell\Microsoft.WinGet.Client\net8.0-windows10.0.22000.0\SharedDependencies\$(BuildPlatform)
flattenFolders: true

- task: CopyFiles@2
Expand Down Expand Up @@ -212,7 +212,7 @@ jobs:
inputs:
SourceFolder: $(buildOutDirAnyCpu)
Contents: |
Microsoft.Management.Configuration.Projection\net6.0-windows10.0.22000.0\Microsoft.Management.Configuration.Projection.dll
Microsoft.Management.Configuration.Projection\net8.0-windows10.0.22000.0\Microsoft.Management.Configuration.Projection.dll
TargetFolder: $(buildOutDirAnyCpu)\PowerShell\Microsoft.WinGet.Configuration\SharedDependencies\$(BuildPlatform)
flattenFolders: true

Expand All @@ -237,7 +237,7 @@ jobs:
- task: CopyFiles@2
displayName: 'Copy Files: WinGetUtilInterop.UnitTests'
inputs:
SourceFolder: '$(Build.SourcesDirectory)\src\WinGetUtilInterop.UnitTests\bin\$(buildPlatform)\$(BuildConfiguration)\net6.0'
SourceFolder: '$(Build.SourcesDirectory)\src\WinGetUtilInterop.UnitTests\bin\$(buildPlatform)\$(BuildConfiguration)\net8.0'
TargetFolder: '$(artifactsDir)\WinGetUtilInterop.UnitTests\'
CleanTargetFolder: true
OverWrite: true
Expand Down
2 changes: 1 addition & 1 deletion src/AppInstallerCLICore/AppInstallerCLICore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@
<PropertyGroup>
<!-- The output path for this project is different on some builds where the RIDs are not used in the output. -->
<MicrosoftManagementConfigurationProcessorPath>$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\Microsoft.Management.Configuration.Processor.winmd</MicrosoftManagementConfigurationProcessorPath>
<MicrosoftManagementConfigurationProcessorPath Condition="!Exists('$(MicrosoftManagementConfigurationProcessorPath)')">$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\net6.0-windows10.0.22000.0\win\Microsoft.Management.Configuration.Processor.winmd</MicrosoftManagementConfigurationProcessorPath>
<MicrosoftManagementConfigurationProcessorPath Condition="!Exists('$(MicrosoftManagementConfigurationProcessorPath)')">$(SolutionDir)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Processor\net8.0-windows10.0.22000.0\win\Microsoft.Management.Configuration.Processor.winmd</MicrosoftManagementConfigurationProcessorPath>
</PropertyGroup>
<Message Importance="high" Text="Microsoft.Management.Configuration.Processor.winmd -&gt; $(MicrosoftManagementConfigurationProcessorPath)" />
<Error Condition="!Exists('$(MicrosoftManagementConfigurationProcessorPath)')" Text="Microsoft.Management.Configuration.Processor.winmd was not found in $(MicrosoftManagementConfigurationProcessorPath)" />
Expand Down
2 changes: 1 addition & 1 deletion src/AppInstallerCLIE2ETests/AppInstallerCLIE2ETests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
11 changes: 4 additions & 7 deletions src/AppInstallerCLIPackage/AppInstallerCLIPackage.wapproj
Original file line number Diff line number Diff line change
Expand Up @@ -217,17 +217,14 @@
copy "$(TargetDir)\resources.pri" "$(TargetDir)\AppInstallerCLI\resources.pri"
</PostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM'">
<ConfigServerRid>win10-arm</ConfigServerRid>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'">
<ConfigServerRid>win10-arm64</ConfigServerRid>
<ConfigServerRid>win-arm64</ConfigServerRid>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='x64'">
<ConfigServerRid>win10-x64</ConfigServerRid>
<ConfigServerRid>win-x64</ConfigServerRid>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='x86'">
<ConfigServerRid>win10-x86</ConfigServerRid>
<ConfigServerRid>win-x86</ConfigServerRid>
</PropertyGroup>
<Target Name="WinGetIncludeAdditionalFilesInPackage" AfterTargets="_ComputeAppxPackagePayload">
<PropertyGroup>
Expand All @@ -253,7 +250,7 @@
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\AnyCPU\$(Configuration)\Microsoft.Management.Configuration.Projection\**\Microsoft.Management.Configuration.Projection.dll">
<PackagePath>ConfigurationRemotingServer\Microsoft.Management.Configuration.Projection.dll</PackagePath>
</WinGetAdditionalPackageFile>
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\ConfigurationRemotingServer\net6.0-windows10.0.22000.0\$(ConfigServerRid)\**\*">
<WinGetAdditionalPackageFile Include="$(WinGetAdditionalPackageFileRoot)\$(PlatformTarget)\$(Configuration)\ConfigurationRemotingServer\net8.0-windows10.0.22000.0\$(ConfigServerRid)\**\*">
<PackagePath>ConfigurationRemotingServer</PackagePath>
<Recurse>true</Recurse>
</WinGetAdditionalPackageFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Platform)' == 'x64' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ param(

# Copy the winmd into the unit test directory since it will be needed for marshalling
$Local:winmdSourcePath = Join-Path $BuildOutputPath "Microsoft.Management.Configuration\Microsoft.Management.Configuration.winmd"
$Local:winmdTargetPath = Join-Path $BuildOutputPath "Microsoft.Management.Configuration.UnitTests\net6.0-windows10.0.22000.0\Microsoft.Management.Configuration.winmd"
$Local:winmdTargetPath = Join-Path $BuildOutputPath "Microsoft.Management.Configuration.UnitTests\net8.0-windows10.0.22000.0\Microsoft.Management.Configuration.winmd"

Copy-Item $Local:winmdSourcePath $Local:winmdTargetPath -Force

# Copy the OOP helper dll into the unit test directory to make activation look the same as in-proc
$Local:dllSourcePath = Join-Path $BuildOutputPath "Microsoft.Management.Configuration.OutOfProc\Microsoft.Management.Configuration.OutOfProc.dll"
$Local:dllTargetPath = Join-Path $BuildOutputPath "Microsoft.Management.Configuration.UnitTests\net6.0-windows10.0.22000.0\Microsoft.Management.Configuration.dll"
$Local:dllTargetPath = Join-Path $BuildOutputPath "Microsoft.Management.Configuration.UnitTests\net8.0-windows10.0.22000.0\Microsoft.Management.Configuration.dll"

Copy-Item $Local:dllSourcePath $Local:dllTargetPath -Force

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows10.0.22000.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.22000.0</TargetFramework>
<Platform>AnyCpu</Platform>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -11,7 +11,7 @@
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public OutOfProcAttribute()
// The test runner is located somewhere like this:
// C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\Extensions\TestPlatform
// and the command line from there is:
// .\vstest.console.exe "<location of your repo>\src\x64\Debug\Microsoft.Management.Configuration.UnitTests\net6.0-windows10.0.22000.0\Microsoft.Management.Configuration.UnitTests.dll" --TestCaseFilter:Category=OutOfProc
// .\vstest.console.exe "<location of your repo>\src\x64\Debug\Microsoft.Management.Configuration.UnitTests\net8.0-windows10.0.22000.0\Microsoft.Management.Configuration.UnitTests.dll" --TestCaseFilter:Category=OutOfProc
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\Microsoft.Management.Deployment.Projection\</OutDir>
<IsPackable>false</IsPackable>
<Platforms>x64;x86;arm64</Platforms>
Expand All @@ -10,7 +10,7 @@
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<PropertyGroup>
<!-- If these target frameworks are updated, make sure to also update the .psd1 and .nuspec files.-->
<!-- Keep in sync with attributes in AssemblyInfo.cs -->
<CoreFramework>net6.0-windows10.0.22000.0</CoreFramework>
<CoreFramework>net8.0-windows10.0.22000.0</CoreFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<DesktopFramework>net48</DesktopFramework>
<Configurations>Debug;Release;ReleaseStatic</Configurations>
<CsWinRTCcwLookupTableGeneratorEnabled>false</CsWinRTCcwLookupTableGeneratorEnabled>
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -52,7 +52,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == '$(CoreFramework)'">
<RuntimeIdentifier>win10</RuntimeIdentifier>
<RuntimeIdentifier>win</RuntimeIdentifier>
</PropertyGroup>

<!-- This project doesn't reference it directly, but if I don't add it here it will fail with NETSDK1130 *.winmd cannot be referenced. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<!-- If these target frameworks are updated, make sure to also update the .psd1 and .nuspec files.-->
<!-- Keep in sync with attributes in AssemblyInfo.cs -->
<TargetWindowsVersion>10.0.22000.0</TargetWindowsVersion>
<CoreFramework>net6.0-windows$(TargetWindowsVersion)</CoreFramework>
<CoreFramework>net8.0-windows$(TargetWindowsVersion)</CoreFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<DesktopFramework>net48</DesktopFramework>
<Configurations>Debug;Release;ReleaseStatic</Configurations>
<CsWinRTCcwLookupTableGeneratorEnabled>false</CsWinRTCcwLookupTableGeneratorEnabled>
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -94,7 +94,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == '$(CoreFramework)'">
<RuntimeIdentifier>win10</RuntimeIdentifier>
<RuntimeIdentifier>win</RuntimeIdentifier>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == '$(DesktopFramework)'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Script module or binary module file associated with this manifest.
RootModule = if ($PSEdition -like 'Core')
{
"net6.0-windows10.0.22000.0\Microsoft.WinGet.Client.Cmdlets.dll"
"net8.0-windows10.0.22000.0\Microsoft.WinGet.Client.Cmdlets.dll"
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
<WindowsSdkPackageVersion>10.0.22000.53</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
CompanyName = 'Microsoft Corporation'
Copyright = '(c) Microsoft Corporation. All rights reserved.'
Description = 'PowerShell Module for the Windows Package Manager Configuration.'
PowerShellVersion = '7.2.8'
PowerShellVersion = '7.4.6'

FunctionsToExport = @()
AliasesToExport = @('cmpwgc', 'cnwgc', 'ctwgcy', 'gwgc', 'gwgcd', 'iwgc', 'rwgch', 'sawgc', 'spwgc','twgc')
Expand Down
4 changes: 2 additions & 2 deletions src/PowerShell/scripts/Initialize-LocalWinGetModules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ if ($moduleToConfigure.HasFlag([ModuleType]::Client))
"WindowsPackageManager\WindowsPackageManager.dll"
"UndockedRegFreeWinRT\winrtact.dll"
)
$module.AddArchSpecificFiles($additionalFiles, "net6.0-windows10.0.22000.0\SharedDependencies", $BuildRoot, $Configuration)
$module.AddArchSpecificFiles($additionalFiles, "net8.0-windows10.0.22000.0\SharedDependencies", $BuildRoot, $Configuration)
$module.AddArchSpecificFiles($additionalFiles, "net48\SharedDependencies", $BuildRoot, $Configuration)
$modules += $module
}
Expand All @@ -226,7 +226,7 @@ if ($moduleToConfigure.HasFlag([ModuleType]::Configuration))
)
$module.AddArchSpecificFiles($additionalFiles, "SharedDependencies", $BuildRoot, $Configuration)
$additionalFiles = @(
"Microsoft.Management.Configuration.Projection\net6.0-windows10.0.22000.0\Microsoft.Management.Configuration.Projection.dll"
"Microsoft.Management.Configuration.Projection\net8.0-windows10.0.22000.0\Microsoft.Management.Configuration.Projection.dll"
)
$module.AddAnyCpuSpecificFilesToArch($additionalFiles, "SharedDependencies", $BuildRoot, $Configuration)
$modules += $module
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Platforms>x64;x86</Platforms>
</PropertyGroup>

Expand All @@ -12,6 +12,8 @@
<PackageReference Include="Microsoft.Msix.Utils" Version="2.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Moq" Version="4.18.2" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="coverlet.collector" Version="1.2.0" />
Expand Down

0 comments on commit f2c0bff

Please sign in to comment.