Skip to content

Commit

Permalink
Spelling, add back SDK versions, more fixier init script, fix ALC han…
Browse files Browse the repository at this point in the history
…dling for 2.1 changes
  • Loading branch information
JohnMcPMS committed Nov 12, 2024
1 parent fb59612 commit 7fe516a
Show file tree
Hide file tree
Showing 15 changed files with 61 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ AMap
Amd
amrutha
ansistring
Aot
APARTMENTTHREADED
apfn
apicontract
Expand Down
4 changes: 4 additions & 0 deletions src/AppInstallerCLIE2ETests/AppInstallerCLIE2ETests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<OutputType>Library</OutputType>
<DocumentationFile>$(OutDir)\AppInstallerCLIE2ETests.xml</DocumentationFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutputPath>
<SelfContained>true</SelfContained>
<RuntimeIdentifiers>win10-x64;win10-x86;win10-arm;win10-arm64</RuntimeIdentifiers>
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(Platform)' == 'x64' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
<NoWarn>1591,8785</NoWarn>
<Configurations>Debug;Release;ReleaseStatic</Configurations>
<CsWinRTEnableLogging>true</CsWinRTEnableLogging>
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutputPath>
<Configurations>Debug;Release;ReleaseStatic</Configurations>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<Platforms>x64;x86;arm64</Platforms>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\$(MSBuildProjectName)\</OutputPath>
<RuntimeIdentifiers>win10-x64;win10-x86;win10-arm;win10-arm64</RuntimeIdentifiers>
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IsAotCompatible>true</IsAotCompatible>
<DisableRuntimeMarshalling>true</DisableRuntimeMarshalling>
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.54</WindowsSdkPackageVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<Platforms>x64;x86;arm64</Platforms>
<OutputType>Library</OutputType>
<Configurations>Debug;Release;ReleaseStatic</Configurations>
<!--
!!! Remove or update this on the next Microsoft.Windows.CsWinRT package version update. !!!
-->
<WindowsSdkPackageVersion>10.0.22000.52</WindowsSdkPackageVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
13 changes: 12 additions & 1 deletion src/PowerShell/CommonFiles/WinGetAssemblyLoadContext.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// <copyright file="WinGetAssemblyLoadContext.cs" company="Microsoft Corporation">
// Copyright (c) Microsoft Corporation. Licensed under the MIT License.
// </copyright>
Expand Down Expand Up @@ -81,6 +81,17 @@ internal static Assembly ResolvingHandler(AssemblyLoadContext context, AssemblyN
return null;
}

/// <summary>
/// Handler to resolve unamanged assemblies.

Check failure on line 85 in src/PowerShell/CommonFiles/WinGetAssemblyLoadContext.cs

View workflow job for this annotation

GitHub Actions / Check Spelling

`unamanged` is not a recognized word. (unrecognized-spelling)
/// </summary>
/// <param name="assembly">Assembly initiating the unmanaged load.</param>
/// <param name="unmanagedDllName">Unmanaged dll name.</param>
/// <returns>The assembly ptr, zero if not in our assembly location.</returns>
internal static IntPtr ResolvingUnmanagedDllHandler(Assembly assembly, string unmanagedDllName)
{
return WinGetAcl.LoadUnmanagedDll(unmanagedDllName);
}

/// <inheritdoc/>
protected override Assembly Load(AssemblyName assemblyName)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<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>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<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>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
<RootNamespace>Microsoft.WinGet.Configuration</RootNamespace>
<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>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// <copyright file="ModuleInit.cs" company="Microsoft Corporation">
// Copyright (c) Microsoft Corporation. Licensed under the MIT License.
// </copyright>
Expand Down Expand Up @@ -30,11 +30,13 @@ public void OnImport()
}

AssemblyLoadContext.Default.Resolving += WinGetAssemblyLoadContext.ResolvingHandler;
AssemblyLoadContext.Default.ResolvingUnmanagedDll += WinGetAssemblyLoadContext.ResolvingUnmanagedDllHandler;
}

/// <inheritdoc/>
public void OnRemove(PSModuleInfo module)
{
AssemblyLoadContext.Default.ResolvingUnmanagedDll -= WinGetAssemblyLoadContext.ResolvingUnmanagedDllHandler;
AssemblyLoadContext.Default.Resolving -= WinGetAssemblyLoadContext.ResolvingHandler;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
<RuntimeIdentifier>win</RuntimeIdentifier>
<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>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down
2 changes: 1 addition & 1 deletion src/PowerShell/scripts/Initialize-LocalWinGetModules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class WinGetModule
$this.Name = $n
$this.ModuleRoot = $m
$this.Output = Join-Path $o $this.Name
New-Item $this.Output -ItemType Directory -ErrorAction SilentlyContinue

if (Get-Module -Name $this.Name)
{
Expand All @@ -67,7 +68,6 @@ class WinGetModule
{
Write-Verbose "Copying binary files: $buildRoot\AnyCpu\$config\PowerShell\$($this.Name)\* -> $($this.Output)"
$copyErrors = $null
New-Item $this.Output -ItemType Directory -ErrorAction SilentlyContinue
Copy-Item "$buildRoot\AnyCpu\$config\PowerShell\$($this.Name)\*" $this.Output -Force -Recurse -ErrorVariable copyErrors -ErrorAction SilentlyContinue
$copyErrors | ForEach-Object { Write-Warning $_ }
}
Expand Down

0 comments on commit 7fe516a

Please sign in to comment.