Blazor-Diagrams / Blazor.Diagrams

A fully customizable and extensible all-purpose diagrams library for Blazor
https://blazor-diagrams.zhaytam.com
MIT License
1.04k stars 210 forks source link

Build error when targeting .net 9.0 #480

Closed stavroskasidis closed 1 week ago

stavroskasidis commented 1 week ago

Hello,

The following error occurs when the project is build using .net 9.0. My guess is that there is a conflict with the new static assets feature of .Net 9.0

C:\Program Files\dotnet\sdk\9.0.100\Sdks\Microsoft.NET.Sdk.StaticWebAssets\targets\Microsoft.NET.Sdk.StaticWebAssets.targets(614,5): error : Conflicting assets with the same target path '_content/Z.Blazor.Diagrams/default.styles.min.css.gz'

zHaytam commented 1 week ago

This is probably related to #471 right?

stavroskasidis commented 1 week ago

Yes it seems so. I will close this in favor of #471

robertmclaws commented 1 week ago

@stavroskasidis in the meantime, just add this to your project:

    <Target Name="RemoveConflictingAssets" BeforeTargets="ResolveStaticWebAssetsConfiguration">
        <ItemGroup>
            <StaticWebAsset Remove="@(StaticWebAsset)" Condition="'%(Extension)' == '.gz'" />
        </ItemGroup>
    </Target>