Skip to content

Commit

Permalink
🔥 FIX - fix unit tests (#1694)
Browse files Browse the repository at this point in the history
pin Compatibility package to match Maui.Controls
  • Loading branch information
pictos authored Feb 14, 2024
1 parent 666f0e9 commit de4eecc
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NetVersion>net8.0</NetVersion>
<MauiPackageVersion>8.0.3</MauiPackageVersion>
<MauiPackageVersion>8.0.6</MauiPackageVersion>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
12 changes: 10 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ variables:
PathToCommunityToolkitAnalyzersCodeFixCsproj: 'src/CommunityToolkit.Maui.Analyzers.CodeFixes/CommunityToolkit.Maui.Analyzers.CodeFixes.csproj'
PathToCommunityToolkitMediaElementAnalyzersCodeFixCsproj: 'src/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes/CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes.csproj'
PathToCommunityToolkitAnalyzersUnitTestCsproj: 'src/CommunityToolkit.Maui.Analyzers.UnitTests/CommunityToolkit.Maui.Analyzers.UnitTests.csproj'
DotNetMauiRollbackFile: 'https://maui.blob.core.windows.net/metadata/rollbacks/8.0.6.json'
CommunityToolkitSampleApp_Xcode_Version: '15.1.0'
CommunityToolkitLibrary_Xcode_Version: '15.0.1'

Expand Down Expand Up @@ -71,8 +72,15 @@ jobs:
version: '$(LATEST_NET_VERSION)'
includePreviewVersions: false

- powershell: dotnet workload install maui --skip-sign-check --source https://api.nuget.org/v3/index.json
displayName: Install Latest .NET MAUI Workload
# Using rollback file is a workaround for a bug in the Azure Hosted Agent; it being used to force the latest MAUI workload manifest
# The rollback file should be removed in a future pull request once the bug has been fixed (likely on the next release of .NET 8)
# The subsequent workload installations can also be removed; we should only need to call `dotnet workload install maui --source https://api.nuget.org/v3/index.json``
- task: CmdLine@2
displayName: 'Install Latest .NET MAUI Workload'
inputs:
script: |
dotnet workload install maui --from-rollback-file $(DotNetMauiRollbackFile) --source https://api.nuget.org/v3/index.json
dotnet workload install maui
- pwsh: |
Invoke-WebRequest 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' -OutFile 'workload-install.ps1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />

<PackageReference Include="Microsoft.Maui.Controls" Version="[$(MauiPackageVersion),)"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="[$(MauiPackageVersion),)"/>
<PackageReference Include="CommunityToolkit.Maui.Markup" Version="4.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.1.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" PrivateAssets="All" />
<PackageReference Include="coverlet.collector" Version="6.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.8.0" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiPackageVersion)"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiPackageVersion)"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Core" Version="$(MauiPackageVersion)"/>
<PackageReference Include="Microsoft.Maui.Essentials" Version="$(MauiPackageVersion)"/>
<PackageReference Include="System.Speech" Version="[8.0.0-rc.2.23479.6,)" Condition="'$(TargetFramework)' == '$(NetVersion)-windows10.0.19041.0'" />
<PackageReference Include="System.Speech" Version="8.0.0" Condition="'$(TargetFramework)' == '$(NetVersion)-windows10.0.19041.0'" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.Maui.Controls" Version="$(MauiPackageVersion)"/>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiPackageVersion)"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiPackageVersion)"/>
<PackageReference Include="Microsoft.Maui.Controls.Maps" Version="$(MauiPackageVersion)"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiPackageVersion)"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiPackageVersion)"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4" PrivateAssets="All" />
<PackageReference Include="coverlet.collector" Version="6.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiPackageVersion)"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiPackageVersion)"/>
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/CommunityToolkit.Maui/CommunityToolkit.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiPackageVersion)"/>
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiPackageVersion)"/>
</ItemGroup>

</Project>

0 comments on commit de4eecc

Please sign in to comment.