Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Update nuget packages. #1569

Closed
wants to merge 13 commits into from
3 changes: 3 additions & 0 deletions azure/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ steps:
verbosityRestore: 'Minimal'
displayName: Restore packages

- script: dotnet list package --outdated
displayName: Outdated Package Check

- script: dotnet build "Discord.Net.sln" --no-restore -v minimal -c $(buildConfiguration) /p:BuildNumber=$(buildNumber) /p:IsTagBuild=$(buildTag)
displayName: Build projects

Expand Down
3 changes: 2 additions & 1 deletion samples/01_basic_ping_bot/01_basic_ping_bot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions samples/02_commands_framework/02_commands_framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions samples/03_sharded_client/03_sharded_client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<RootNamespace>_03_sharded_client</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion samples/04_webhook_client/04_webhook_client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<RootNamespace>_04_webhook_client</RootNamespace>
</PropertyGroup>

Expand Down
5 changes: 3 additions & 2 deletions samples/idn/idn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="3.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="3.8.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Discord.Net.Analyzers/Discord.Net.Analyzers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
<AssemblyName>Discord.Net.Analyzers</AssemblyName>
<RootNamespace>Discord.Analyzers</RootNamespace>
<Description>A Discord.Net extension adding support for design-time analysis of the API usage.</Description>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.3.1" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.8.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Discord.Net.Commands\Discord.Net.Commands.csproj" />
Expand Down
9 changes: 7 additions & 2 deletions src/Discord.Net.Commands/Discord.Net.Commands.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
<AssemblyName>Discord.Net.Commands</AssemblyName>
<RootNamespace>Discord.Commands</RootNamespace>
<Description>A Discord.Net extension adding support for bot commands.</Description>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net461;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;netstandard2.1</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>net461;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<!-- The reference assemblies package here can allow to build for .NET Framework when not using windows as well. -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" Condition="'$(TargetFramework)' == 'net461'">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
</ItemGroup>

Expand Down
22 changes: 16 additions & 6 deletions src/Discord.Net.Core/Discord.Net.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,24 @@
<AssemblyName>Discord.Net.Core</AssemblyName>
<RootNamespace>Discord</RootNamespace>
<Description>The core components for the Discord.Net library.</Description>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net461;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;netstandard2.1</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>net461;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="System.Collections.Immutable" Version="1.3.1" />
<PackageReference Include="System.Interactive.Async" Version="4.0.0" />
<PackageReference Include="IDisposableAnalyzers" Version="2.1.2">
<!-- The reference assemblies package here can allow to build for .NET Framework when not using windows as well. -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" Condition="'$(TargetFramework)' == 'net461'">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<!-- System.ValueTuple is in .NET Framework 4.7+, older versions need the package. -->
<PackageReference Include="System.ValueTuple" Version="4.5.0" Condition="'$(TargetFramework)' == 'net461'" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<!-- oddly enough supports .NET Core 2.1+ and other frameworks. -->
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
<!-- <PackageReference Include="System.Interactive.Async" Version="5.0.0" /> -->
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
<PackageReference Include="System.Linq.Async" Version="5.0.0" />
<PackageReference Include="IDisposableAnalyzers" Version="3.4.8">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
9 changes: 7 additions & 2 deletions src/Discord.Net.DebugTools/Discord.Net.DebugTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
<AssemblyName>Discord.Net.DebugTools</AssemblyName>
<RootNamespace>Discord</RootNamespace>
<Description>A Discord.Net extension adding some helper classes for diagnosing issues.</Description>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net45;netstandard1.3</TargetFrameworks>
<TargetFramework Condition=" '$(OS)' != 'Windows_NT' ">netstandard1.3</TargetFramework>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<!-- The reference assemblies package here can allow to build for .NET Framework when not using windows as well. -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" Condition="'$(TargetFramework)' == 'net45'">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
</ItemGroup>
</Project>
5 changes: 3 additions & 2 deletions src/Discord.Net.Examples/Discord.Net.Examples.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -15,7 +16,7 @@
<ItemGroup>
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
<ProjectReference Include="..\Discord.Net.WebSocket\Discord.Net.WebSocket.csproj" />
<PackageReference Include="JetBrains.Annotations" Version="2019.1.3" />
<PackageReference Include="JetBrains.Annotations" Version="2020.3.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<AssemblyName>Discord.Net.Providers.WS4Net</AssemblyName>
<RootNamespace>Discord.Providers.WS4Net</RootNamespace>
<Description>An optional WebSocket client provider for Discord.Net using WebSocket4Net</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
Expand Down
9 changes: 7 additions & 2 deletions src/Discord.Net.Rest/Discord.Net.Rest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
<AssemblyName>Discord.Net.Rest</AssemblyName>
<RootNamespace>Discord.Rest</RootNamespace>
<Description>A core Discord.Net library containing the REST client and models.</Description>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net461;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;netstandard2.1</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>net461;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<!-- The reference assemblies package here can allow to build for .NET Framework when not using windows as well. -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" Condition="'$(TargetFramework)' == 'net461'">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
Expand Down
9 changes: 7 additions & 2 deletions src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
<AssemblyName>Discord.Net.WebSocket</AssemblyName>
<RootNamespace>Discord.WebSocket</RootNamespace>
<Description>A core Discord.Net library containing the WebSocket client and models.</Description>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net461;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;netstandard2.1</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>net461;netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<!-- The reference assemblies package here can allow to build for .NET Framework when not using windows as well. -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" Condition="'$(TargetFramework)' == 'net461'">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
<ProjectReference Include="..\Discord.Net.Rest\Discord.Net.Rest.csproj" />
</ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Discord.Net.Webhook/Discord.Net.Webhook.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<AssemblyName>Discord.Net.Webhook</AssemblyName>
<RootNamespace>Discord.Webhook</RootNamespace>
<Description>A core Discord.Net library containing the Webhook client and models.</Description>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
Expand Down
12 changes: 10 additions & 2 deletions src/Discord.Net/Discord.Net.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,23 @@
<dependency id="Discord.Net.WebSocket" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.Commands" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.Webhook" version="2.3.1-dev$suffix$" />
</group>
</group>
<group targetFramework="netstandard2.0">
<dependency id="Discord.Net.Core" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.Rest" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.WebSocket" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.Commands" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.Webhook" version="2.3.1-dev$suffix$" />
</group>
<group targetFramework="netstandard2.1">
<group targetFramework="netstandard2.1">
<dependency id="Discord.Net.Core" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.Rest" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.WebSocket" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.Commands" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.Webhook" version="2.3.1-dev$suffix$" />
</group>
<!-- Added .NET 5.0. -->
<group targetFramework="net5.0">
<dependency id="Discord.Net.Core" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.Rest" version="2.3.1-dev$suffix$" />
<dependency id="Discord.Net.WebSocket" version="2.3.1-dev$suffix$" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.3.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>

<IsPackable>false</IsPackable>
Expand All @@ -15,9 +16,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions test/Discord.Net.Tests.Unit/Discord.Net.Tests.Unit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<ProjectReference Include="../../src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down