Skip to content

Commit

Permalink
chore: Remove HD analyzer when building in release
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Nov 16, 2024
1 parent a314729 commit 3b1e377
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Uno.Sdk/targets/Uno.Implicit.Packages.ProjectSystem.targets
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,17 @@
<ItemGroup>
<PackageReference Include="@(_UnoProjectSystemPackageReference)" Exclude="@(PackageReference)" />
</ItemGroup>

<!-- HD workaround for https://github.com/dotnet/sdk/issues/1212, see HD#2924 -->
<Target Name="_RemoveHDAnalyzerRelease"
BeforeTargets="CoreCompile;XamlPreCompile"
Condition=" '$(Optimize)' == 'true' ">
<!---
Remove HD analyzers in release mode, as they cannot work in release mode.
-->
<ItemGroup>
<_HDAnalyzerToRemove Include="@(Analyzer)" Condition="'%(Analyzer.NuGetPackageId)'=='Uno.UI.HotDesign'" />
<Analyzer Remove="@(_HDAnalyzerToRemove)"/>
</ItemGroup>
</Target>
</Project>

0 comments on commit 3b1e377

Please sign in to comment.