Update Packaging targets to drop netstandard

This commit is contained in:
Caelan Sayler
2024-03-10 23:04:18 +00:00
parent 6873fbce41
commit 0e910e1e93
7 changed files with 14 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA2007;CS8002;IDE0161</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Reflection.Metadata" Version="8.0.0" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="System.Reflection.Metadata" Version="8.0.0" Condition="'$(TargetFramework)' == 'net472'" />
</ItemGroup>
</Project>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA2007;CS8002</NoWarn>
</PropertyGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA2007;CS8002</NoWarn>
</PropertyGroup>

View File

@@ -1,4 +1,5 @@
using Microsoft.Identity.Client;
using System.Net.Http;
using Microsoft.Identity.Client;
using Microsoft.Identity.Client.Extensions.Msal;

View File

@@ -1,13 +1,15 @@
#if NETSTANDARD2_0
#if NETFRAMEWORK || NETSTANDARD2_0
#nullable enable
using System.Net.Http;
namespace Velopack.Packaging;
public static class HttpClientExtensions
{
public static async Task<TValue?> GetFromJsonAsync<TValue>(
this HttpClient client,
Uri? requestUri,
this HttpClient client,
Uri? requestUri,
CancellationToken cancellationToken = default)
{
var response = await client.GetAsync(requestUri, cancellationToken);

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<NoWarn>$(NoWarn);CA2007;CS8002</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -13,6 +13,7 @@
<ItemGroup>
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="Markdig" Version="0.34.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.59.0" />
<PackageReference Include="Microsoft.Identity.Client.Broker" Version="4.59.0" />

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net462;net48;netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;net472;net48;netstandard2.0;net6.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>