mirror of
https://github.com/microsoft/PowerToys
synced 2024-11-22 00:03:48 +00:00
Fail build when nugets aren't consolidated (#22233)
* fail build when nugets aren't consolidated * consolidate nugets * change tool install * consolidate nugets * fix message
This commit is contained in:
parent
f41fe145fc
commit
b9367c0ca6
12
.config/dotnet-tools.json
Normal file
12
.config/dotnet-tools.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-consolidate": {
|
||||
"version": "2.0.0",
|
||||
"commands": [
|
||||
"dotnet-consolidate"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -7,6 +7,13 @@ steps:
|
||||
submodules: true
|
||||
clean: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verifying Nuget packages for PowerToys.sln
|
||||
inputs:
|
||||
filePath: '$(build.sourcesdirectory)\.pipelines\verifyNugetPackages.ps1'
|
||||
arguments: -solution '$(build.sourcesdirectory)\PowerToys.sln'
|
||||
pwsh: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Verify Arm64 configuration for PowerToys.sln
|
||||
inputs:
|
||||
|
18
.pipelines/verifyNugetPackages.ps1
Normal file
18
.pipelines/verifyNugetPackages.ps1
Normal file
@ -0,0 +1,18 @@
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Mandatory=$True,Position=1)]
|
||||
[string]$solution
|
||||
)
|
||||
|
||||
Write-Host "Verifying Nuget packages for $solution"
|
||||
|
||||
dotnet tool restore
|
||||
dotnet consolidate -s $solution
|
||||
|
||||
if (-not $?)
|
||||
{
|
||||
Write-Host -ForegroundColor Red "Nuget packages with the same name must all be the same version."
|
||||
exit 1
|
||||
}
|
||||
|
||||
exit 0
|
@ -59,7 +59,7 @@
|
||||
<PackageReference Include="CommunityToolkit.WinUI.UI" Version="7.1.2" />
|
||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.5" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.9" />
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22000.194" />
|
||||
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.1" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageReference Include="WinUIEx" Version="1.8.0" />
|
||||
<Manifest Include="$(ApplicationManifest)" />
|
||||
|
Loading…
Reference in New Issue
Block a user