Bump cswinrt and ignore PowerToys dlls in verifyDepsJsonLibraryVersions.ps1 (#34297)

This commit is contained in:
Stefan Markovic 2024-08-14 18:07:43 +02:00 committed by GitHub
parent f56abb83c1
commit 67d99a8377
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 7 deletions

View File

@ -41,7 +41,13 @@ Get-ChildItem $targetDir -Recurse -Filter *.deps.json -Exclude UITests-FancyZone
$dllName = Split-Path $_.Name -leaf
if([bool]($_.Value.PSObject.Properties.name -match 'fileVersion')) {
$dllFileVersion = $_.Value.fileVersion
if ([string]::IsNullOrEmpty($dllFileVersion) -and $dllName.StartsWith('PowerToys.'))` {
# After VS 17.11 update some of PowerToys dlls have no fileVersion in deps.json even though the
# version is correctly set. This is a workaround to skip our dlls as we are confident that all of
# our dlls share the same version across the dependencies.
continue
}
# Add the entry to the dictionary of dictionary of lists
if(-Not $referencedFileVersionsPerDll.ContainsKey($dllName)) {
$referencedFileVersionsPerDll[$dllName] = @{ $dllFileVersion = New-Object System.Collections.Generic.List[System.String] }

View File

@ -14,13 +14,13 @@
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>Recommended</AnalysisMode>
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> <!-- Don't add source revision hash to the product version of binaries. -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion> <!-- Don't add source revision hash to the product version of binaries. -->
<PlatformTarget>$(Platform)</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.csproj'">
<Version>$(Version).0</Version>
<RepositoryUrl>https://github.com/microsoft/PowerToys</RepositoryUrl>
<RepositoryUrl>https://github.com/microsoft/PowerToys</RepositoryUrl>
<RepositoryType>GitHub</RepositoryType>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
@ -34,7 +34,7 @@
<PackageReference Include="StyleCop.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</PackageReference>
<Compile Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<AdditionalFiles Include="$(MSBuildThisFileDirectory)\src\codeAnalysis\StyleCop.json" Link="StyleCop.json" />

View File

@ -38,7 +38,7 @@
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="8.0.7" />
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
<!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. -->
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.4" />
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.8" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.5.240428000" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />

View File

@ -1329,7 +1329,7 @@ EXHIBIT A -Mozilla Public License.
- Microsoft.Win32.SystemEvents 8.0.0
- Microsoft.Windows.Compatibility 8.0.7
- Microsoft.Windows.CsWin32 0.2.46-beta
- Microsoft.Windows.CsWinRT 2.0.4
- Microsoft.Windows.CsWinRT 2.0.8
- Microsoft.Windows.SDK.BuildTools 10.0.22621.2428
- Microsoft.WindowsAppSDK 1.5.240428000
- Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9

View File

@ -16,7 +16,9 @@ namespace std
size_t operator()(const GUID& Value) const
{
RPC_STATUS status = RPC_S_OK;
return ::UuidHash(&const_cast<GUID&>(Value), &status);
// Make a copy of the Value to avoid using const_cast to cast away cost - workaround C26492
GUID copy = Value;
return ::UuidHash(&copy, &status);
}
};
}