Skip to content

Commit

Permalink
Add .Net 6 support again.
Browse files Browse the repository at this point in the history
  • Loading branch information
lolochristen committed Feb 16, 2024
1 parent 014cc90 commit 0ad22a3
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/OpenLayers.Blazor/OpenLayers.Blazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Authors>Laurent Christen</Authors>
Expand Down Expand Up @@ -36,6 +36,10 @@
</None>
</ItemGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<DefineConstants>$(DefineConstants);NET6_0</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<DefineConstants>$(DefineConstants);NET7_0</DefineConstants>
</PropertyGroup>
Expand All @@ -44,6 +48,14 @@
<DefineConstants>$(DefineConstants);NET8_0</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0|AnyCPU'">
<NoWarn>1701;1702;BL0005;BL0007</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net6.0|AnyCPU'">
<NoWarn>1701;1702;BL0005;BL0007</NoWarn>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0|AnyCPU'">
<NoWarn>1701;1702;BL0005;BL0007</NoWarn>
</PropertyGroup>
Expand All @@ -60,6 +72,11 @@
<NoWarn>1701;1702;BL0005;BL0007</NoWarn>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="6.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.*" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Components" Version="7.0.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.*" />
Expand Down

0 comments on commit 0ad22a3

Please sign in to comment.