Skip to content

Commit

Permalink
clean up projects and target frameworks (#224)
Browse files Browse the repository at this point in the history
* make target frameworks consistent, and specifically add net461 as recommended in official docs
https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/cross-platform-targeting#multi-targeting

* add docker-compose file to solution

* fix compiler error caused by `AspNetWebApi2Integration` missing in some target frameworks

* remove unused project

* remove unnecessary project properties

* keep number of build targets low by only using `net461` and `netcoreapp2.0`

* fix compiler error caused by `AspNetWebApi2Integration` missing in some target frameworks

* fix target framework on non-Windows OS

* fix target version when running integration tests on Linux with docker compose
  • Loading branch information
lucaspimentel authored Dec 3, 2018
1 parent 9131814 commit 0e67324
Show file tree
Hide file tree
Showing 18 changed files with 17 additions and 135 deletions.
22 changes: 1 addition & 21 deletions Datadog.Trace.sln
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Datadog.Trace.proj = Datadog.Trace.proj
Datadog.Trace.snk = Datadog.Trace.snk
Directory.Build.props = Directory.Build.props
docker-compose.yml = docker-compose.yml
GlobalSuppressions.cs = GlobalSuppressions.cs
ci\install-sqlserver.ps1 = ci\install-sqlserver.ps1
integrations.json = integrations.json
Expand All @@ -47,14 +48,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8CEC2042-F
test\GlobalSuppressions.cs = test\GlobalSuppressions.cs
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{F1EFDD86-0213-4C73-9B38-AEBBDABE984F}"
ProjectSection(SolutionItems) = preProject
benchmarks\Directory.Build.props = benchmarks\Directory.Build.props
benchmarks\GlobalSuppressions.cs = benchmarks\GlobalSuppressions.cs
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Datadog.Trace.Performance", "benchmarks\Datadog.Trace.Performance\Datadog.Trace.Performance.csproj", "{733120FD-2423-491A-8FB1-427867101D8D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Datadog.Trace.ClrProfiler.Managed", "src\Datadog.Trace.ClrProfiler.Managed\Datadog.Trace.ClrProfiler.Managed.csproj", "{85F35AAF-D102-4960-8B41-3BD9CBD0E77F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{AA6F5582-3B71-49AC-AA39-8F7815AC46BE}"
Expand Down Expand Up @@ -226,18 +219,6 @@ Global
{237A1C92-DE9E-4649-961B-BBB7CF0DFE01}.Release|x64.Build.0 = Release|Any CPU
{237A1C92-DE9E-4649-961B-BBB7CF0DFE01}.Release|x86.ActiveCfg = Release|Any CPU
{237A1C92-DE9E-4649-961B-BBB7CF0DFE01}.Release|x86.Build.0 = Release|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Debug|x64.ActiveCfg = Debug|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Debug|x64.Build.0 = Debug|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Debug|x86.ActiveCfg = Debug|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Debug|x86.Build.0 = Debug|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Release|Any CPU.Build.0 = Release|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Release|x64.ActiveCfg = Release|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Release|x64.Build.0 = Release|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Release|x86.ActiveCfg = Release|Any CPU
{733120FD-2423-491A-8FB1-427867101D8D}.Release|x86.Build.0 = Release|Any CPU
{85F35AAF-D102-4960-8B41-3BD9CBD0E77F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85F35AAF-D102-4960-8B41-3BD9CBD0E77F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85F35AAF-D102-4960-8B41-3BD9CBD0E77F}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -430,7 +411,6 @@ Global
{3BCE5D99-147B-4305-9970-AB0F683A6E8D} = {8CEC2042-F11C-49F5-A674-2355793B600A}
{EFBFC324-B459-4D39-8E19-CE4AD0DBF15F} = {8CEC2042-F11C-49F5-A674-2355793B600A}
{237A1C92-DE9E-4649-961B-BBB7CF0DFE01} = {8CEC2042-F11C-49F5-A674-2355793B600A}
{733120FD-2423-491A-8FB1-427867101D8D} = {F1EFDD86-0213-4C73-9B38-AEBBDABE984F}
{85F35AAF-D102-4960-8B41-3BD9CBD0E77F} = {9E5F0022-0A50-40BF-AC6A-C3078585ECAB}
{3C6DD42E-9214-4747-92BA-78DE29AACE59} = {AA6F5582-3B71-49AC-AA39-8F7815AC46BE}
{9951A03A-AD1B-48D8-A96D-B85532BEDADD} = {AA6F5582-3B71-49AC-AA39-8F7815AC46BE}
Expand Down

This file was deleted.

13 changes: 0 additions & 13 deletions benchmarks/Datadog.Trace.Performance/Program.cs

This file was deleted.

25 changes: 0 additions & 25 deletions benchmarks/Datadog.Trace.Performance/TracerBenchmarks.cs

This file was deleted.

8 changes: 0 additions & 8 deletions benchmarks/Directory.Build.props

This file was deleted.

8 changes: 0 additions & 8 deletions benchmarks/GlobalSuppressions.cs

This file was deleted.

6 changes: 1 addition & 5 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
cd "$DIR/.."

for config in Debug Release ; do
for proj in Datadog.Trace Datadog.Trace.OpenTracing ; do
for proj in Datadog.Trace Datadog.Trace.ClrProfiler.Managed Datadog.Trace Datadog.Trace.OpenTracing ; do
dotnet publish -f netstandard2.0 -c $config src/$proj/$proj.csproj
done

for proj in Datadog.Trace.ClrProfiler.Managed ; do
dotnet publish -f netcoreapp2.0 -c $config src/$proj/$proj.csproj
done

for sample in Samples.AspNetCoreMvc2 Samples.ConsoleCore Samples.Elasticsearch Samples.RedisCore Samples.SqlServer ; do
dotnet publish -f netcoreapp2.0 -c $config samples/$sample/$sample.csproj
done
Expand Down
2 changes: 1 addition & 1 deletion samples/Samples.ConsoleCore/Samples.ConsoleCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net452;net461;net47;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions samples/Samples.Elasticsearch/Samples.Elasticsearch.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net452;net461;net47;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
Expand Down
10 changes: 1 addition & 9 deletions samples/Samples.ExampleLibrary/Samples.ExampleLibrary.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<SignAssembly>false</SignAssembly>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<WarningLevel>0</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
<NoWarn>1701;1702;NU1701</NoWarn>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
<WarningLevel>0</WarningLevel>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<WarningLevel>0</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>

</Project>
4 changes: 2 additions & 2 deletions samples/Samples.RedisCore/Samples.RedisCore.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net452;net461;net47;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
Expand Down
6 changes: 1 addition & 5 deletions samples/Samples.SqlServer/Samples.SqlServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net461;net47;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
<Platforms>AnyCPU;x64;x86</Platforms>
<RuntimeIdentifiers>win-x64;win-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
Expand All @@ -20,10 +20,6 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.2" />
</ItemGroup>

<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Datadog.Trace.ClrProfiler.Managed\Datadog.Trace.ClrProfiler.Managed.csproj" />
<ProjectReference Include="..\..\src\Datadog.Trace\Datadog.Trace.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net45;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net45;net461</TargetFrameworks>
<Version>0.5.1-beta</Version>
<RootNamespace>Datadog.Trace.ClrProfiler</RootNamespace>
<LangVersion>7.3</LangVersion>
Expand All @@ -13,7 +13,7 @@
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -24,7 +24,7 @@
<PackageReference Include="Sigil" Version="4.7.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' ">
<Reference Include="System.Configuration" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Web" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NET45
#if !NETSTANDARD2_0

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NET45
#if !NETSTANDARD2_0

using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net46</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net45;net461</TargetFrameworks>
<Version>0.5.1-beta</Version>

<!-- NuGet -->
Expand Down
2 changes: 1 addition & 1 deletion src/Datadog.Trace/Datadog.Trace.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net46</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net45;net461</TargetFrameworks>
<Version>0.5.1-beta</Version>

<!-- NuGet -->
Expand Down

0 comments on commit 0e67324

Please sign in to comment.