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 коммит произвёл GitHub
Родитель f56abb83c1
Коммит 67d99a8377
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 15 добавлений и 7 удалений

Просмотреть файл

@ -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] }

Просмотреть файл

@ -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" />

Просмотреть файл

@ -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" />

Просмотреть файл

@ -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

Просмотреть файл

@ -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);
}
};
}