Browse Source

Use 'Condition' attributes

refs: 6f29dda78b (r181371650)
pull/1026/head
Acid Chicken (硫酸鶏) 8 years ago
parent
commit
319bbcffad
No known key found for this signature in database GPG Key ID: E292DBE5D23A5846
4 changed files with 36 additions and 87 deletions
  1. +7
    -18
      src/Discord.Net.Core/Discord.Net.Core.csproj
  2. +7
    -18
      src/Discord.Net.DebugTools/Discord.Net.DebugTools.csproj
  3. +14
    -31
      src/Discord.Net.Rest/Discord.Net.Rest.csproj
  4. +8
    -20
      src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj

+ 7
- 18
src/Discord.Net.Core/Discord.Net.Core.csproj View File

@@ -1,23 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../Discord.Net.targets" />
<Choose>
<When Condition=" '$(OS)' == 'Windows_NT' ">
<PropertyGroup>
<AssemblyName>Discord.Net.Core</AssemblyName>
<RootNamespace>Discord</RootNamespace>
<Description>The core components for the Discord.Net library.</Description>
<TargetFrameworks>net45;netstandard1.1;netstandard1.3</TargetFrameworks>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<AssemblyName>Discord.Net.Core</AssemblyName>
<RootNamespace>Discord</RootNamespace>
<Description>The core components for the Discord.Net library.</Description>
<TargetFrameworks>netstandard1.1;netstandard1.3</TargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<AssemblyName>Discord.Net.Core</AssemblyName>
<RootNamespace>Discord</RootNamespace>
<Description>The core components for the Discord.Net library.</Description>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net45;netstandard1.1;netstandard1.3</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard1.1;netstandard1.3</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
<PackageReference Include="System.Collections.Immutable" Version="1.3.1" />


+ 7
- 18
src/Discord.Net.DebugTools/Discord.Net.DebugTools.csproj View File

@@ -1,23 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../Discord.Net.targets" />
<Choose>
<When Condition=" '$(OS)' == 'Windows_NT' ">
<PropertyGroup>
<AssemblyName>Discord.Net.DebugTools</AssemblyName>
<RootNamespace>Discord</RootNamespace>
<Description>A Discord.Net extension adding some helper classes for diagnosing issues.</Description>
<TargetFrameworks>net45;netstandard1.3</TargetFrameworks>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<AssemblyName>Discord.Net.DebugTools</AssemblyName>
<RootNamespace>Discord</RootNamespace>
<Description>A Discord.Net extension adding some helper classes for diagnosing issues.</Description>
<TargetFrameworks>netstandard1.3</TargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<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>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
</ItemGroup>


+ 14
- 31
src/Discord.Net.Rest/Discord.Net.Rest.csproj View File

@@ -1,37 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../Discord.Net.targets" />
<Choose>
<When Condition=" '$(OS)' == 'Windows_NT' ">
<PropertyGroup>
<AssemblyName>Discord.Net.Rest</AssemblyName>
<RootNamespace>Discord.Rest</RootNamespace>
<Description>A core Discord.Net library containing the REST client and models.</Description>
<TargetFrameworks>net45;netstandard1.1;netstandard1.3</TargetFrameworks>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<AssemblyName>Discord.Net.Rest</AssemblyName>
<RootNamespace>Discord.Rest</RootNamespace>
<Description>A core Discord.Net library containing the REST client and models.</Description>
<TargetFrameworks>netstandard1.1;netstandard1.3</TargetFrameworks>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<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' ">net45;netstandard1.1;netstandard1.3</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard1.1;netstandard1.3</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
</ItemGroup>
<Choose>
<When Condition=" '$(TargetFramework)' != 'net45' ">
<ItemGroup>
<PackageReference Include="System.Net.Http" Version="4.3.2" />
<!-- https://github.com/dotnet/corefx/issues/19535 -->
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Reference Include="System.Net.Http" />
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup Condition=" '$(TargetFramework)' != 'net45' ">
<PackageReference Include="System.Net.Http" Version="4.3.2" />
<!-- https://github.com/dotnet/corefx/issues/19535 -->
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System.Net.Http" />
</ItemGroup>
</Project>

+ 8
- 20
src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj View File

@@ -1,25 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../Discord.Net.targets" />
<Choose>
<When Condition=" '$(OS)' == 'Windows_NT' ">
<PropertyGroup>
<AssemblyName>Discord.Net.WebSocket</AssemblyName>
<RootNamespace>Discord.WebSocket</RootNamespace>
<Description>A core Discord.Net library containing the WebSocket client and models.</Description>
<TargetFrameworks>net45;netstandard1.1;netstandard1.3</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<AssemblyName>Discord.Net.WebSocket</AssemblyName>
<RootNamespace>Discord.WebSocket</RootNamespace>
<Description>A core Discord.Net library containing the WebSocket client and models.</Description>
<TargetFrameworks>netstandard1.1;netstandard1.3</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<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' ">net45;netstandard1.1;netstandard1.3</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard1.1;netstandard1.3</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
<ProjectReference Include="..\Discord.Net.Rest\Discord.Net.Rest.csproj" />


Loading…
Cancel
Save