Skip to content

Commit b05402b

Browse files
committed
Restart Appx/MSIX package management based around PowerShell's builtin cmdlets.
There's a lot of issues here and replicating it within our own code is probably more trouble than it's worth. The PowerShell module `Dism` uses undocumented Win32 entrypoints to do its job, and we can't replicate the functionality of the Dism-based cmdlets via WinRT as the P/Invokes just work differently. Also for the Appx module, Microsoft silently retargeted this module to be netstandard2.0. This is documented at https://learn.microsoft.com/en-us/windows/win32/appxpkg/how-to-use-appx-module-without-powershell and I've been able to confirm this with ILSpy, however the main module compatibility page has _not_ been updated to reflect this: https://learn.microsoft.com/en-us/powershell/windows/module-compatibility?view=windowsserver2025-ps#module-list. This means we no longer have to rewrite its functionality for Windows PowerShell/PowerShell 7 portability. As such, let's just leverage the capabilities PowerShell natively provides as it should meet all our needs while providing an experience that most PowerShell users are used to receiving.
1 parent 8502b76 commit b05402b

7 files changed

Lines changed: 5 additions & 378 deletions

File tree

src/PSADT/PSADT.Interop/PSADT.Interop.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<InternalsVisibleTo Include="PSADT.UserInterface" />
2121
<InternalsVisibleTo Include="PSADT.UserInterface.Interfaces" />
2222
<InternalsVisibleTo Include="PSADT.UserInterface.TestHarness" />
23-
<InternalsVisibleTo Include="PSADT.WindowsRuntime" />
2423
<InternalsVisibleTo Include="PSAppDeployToolkit" />
2524
</ItemGroup>
2625

src/PSADT/PSADT.WindowsRuntime/Management/Deployment/PackageInformation.cs

Lines changed: 0 additions & 287 deletions
This file was deleted.

src/PSADT/PSADT.WindowsRuntime/PSADT.WindowsRuntime.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99
<AssemblyDescription>This assembly provides access to Windows Runtime (WinRT) interfaces for PSAppDeployToolkit.</AssemblyDescription>
1010
</PropertyGroup>
1111

12-
<ItemGroup>
13-
<ProjectReference Include="..\PSADT.Interop\PSADT.Interop.csproj" />
14-
</ItemGroup>
15-
1612
<ItemGroup>
1713
<InternalsVisibleTo Include="PSADT.ClientServer.Client" />
1814
<InternalsVisibleTo Include="PSADT.ClientServer.Client.Compatible" />
@@ -22,6 +18,5 @@
2218

2319
<ItemGroup Condition="'$(TargetFramework)' == 'net472'">
2420
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.28000.1839" />
25-
<Reference Include="System.IO.Compression" />
2621
</ItemGroup>
2722
</Project>

src/PSADT/PSADT.WindowsRuntime/Management/Deployment/ManifestInformation.cs renamed to src/PSADT/PSADT/AppManagement/ManifestInformation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using Windows.Win32.Storage.Packaging.Appx;
33

4-
namespace PSADT.WindowsRuntime.Management.Deployment
4+
namespace PSADT.AppManagement
55
{
66
/// <summary>
77
/// Represents information about a Windows Runtime package.

0 commit comments

Comments
 (0)