Skip to content

Use .NET Standard 2.0 CommandLineParser, Update to net461 for NS2.0 support #992

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

Merged
merged 2 commits into from
Jan 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<UseSharedCompilation>false</UseSharedCompilation>
</PropertyGroup>

<PropertyGroup Condition=" '$(IsVisualBasic)' != 'true' And '$(TargetFramework)' == 'net46' ">
<PropertyGroup Condition=" '$(IsVisualBasic)' != 'true' And $(TargetFramework.StartsWith('net4')) ">
<DefineConstants>$(DefineConstants);CLASSIC</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(IsVisualBasic)' != 'true' And ('$(TargetFramework)' == 'netcoreapp2.0' Or '$(TargetFramework)' == 'netcoreapp2.1') ">
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/contributing/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ There should be two debug profiles available in VS drop down

![](https://cloud.githubusercontent.com/assets/6011991/15627671/89f2405a-24eb-11e6-8bd1-c9d45613e0f6.png "Debug profiles")

However due to VS 2017 RC4 bug it seems that it's impossible to choose as of 2/19/2017. If you want to change it then please edit the project file (.csproj) and set your order - the first framework moniker is always used. `<TargetFrameworks>netcoreapp1.1;net46</TargetFrameworks>`
However due to VS 2017 RC4 bug it seems that it's impossible to choose as of 2/19/2017. If you want to change it then please edit the project file (.csproj) and set your order - the first framework moniker is always used. `<TargetFrameworks>netcoreapp1.1;net461</TargetFrameworks>`
2 changes: 1 addition & 1 deletion docs/articles/contributing/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Just add it to the top level of csproj.
Specify a conditional dependency:

```xml
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<ItemGroup Condition=" $(TargetFramework.StartsWith('net4')) ">
<ProjectReference Include="..\..\src\BenchmarkDotNet.Diagnostics.Windows\BenchmarkDotNet.Diagnostics.Windows.csproj" />
</ItemGroup>
```
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If you want to target netcoreapp1.0 in your main assembly, it's recommended to c
[CoreJob, ClrJob, MonoJob]
```

* **Q** My source code targets old versions of .NET Framework or .NET Core, but BenchmarkDotNet requires `net46` and `netcoreapp2.0`. How can I run benchmarks in this case?
* **Q** My source code targets old versions of .NET Framework or .NET Core, but BenchmarkDotNet requires `net461` and `netcoreapp2.0`. How can I run benchmarks in this case?

**A** It's a good practice to introduce an additional console application (e.g. `MyAwesomeLibrary.Benchmarks`) which will depend on your code and BenchmarkDotNet.
Due to the fact that users usually run benchmarks in a develop environment and don't distribute benchmarks for users, it shouldn't be a problem.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<AssemblyTitle>BenchmarkDotNet.Samples</AssemblyTitle>
<TargetFrameworks>net46;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<RuntimeIdentifiers Condition=" '$(TargetFrameworkIdentifier)' == '.NETCoreApp' ">win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers>
<RuntimeIdentifiers Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">win7-x64;win7-x86</RuntimeIdentifiers>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>Powerful .NET library for benchmarking (Diagnostic Tools for Windows)</Description>
<AssemblyTitle>BenchmarkDotNet.Diagnostics.Windows</AssemblyTitle>
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
<NoWarn>1701;1702;1705;1591;3001;3003;3002;3009</NoWarn>
<AssemblyName>BenchmarkDotNet.Diagnostics.Windows</AssemblyName>
<PackageId>BenchmarkDotNet.Diagnostics.Windows</PackageId>
Expand Down
6 changes: 3 additions & 3 deletions src/BenchmarkDotNet/BenchmarkDotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<AssemblyTitle>BenchmarkDotNet</AssemblyTitle>
<TargetFrameworks>net46;netstandard2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netstandard2.0;netcoreapp2.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn);1701;1702;1705;1591;3005</NoWarn>
<AssemblyName>BenchmarkDotNet</AssemblyName>
Expand All @@ -19,7 +19,7 @@
<EmbeddedResource Include="Disassemblers\net46\win7-x64\Mono.Cecil.Rocks.dll" />
<EmbeddedResource Include="Disassemblers\net46\win7-x64\Mono.Cecil.dll" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<ItemGroup Condition=" $(TargetFramework.StartsWith('net4')) ">
<ProjectReference Include="..\BenchmarkDotNet.Disassembler.x64\BenchmarkDotNet.Disassembler.x64.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
Expand All @@ -28,7 +28,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.3.0" />
<PackageReference Include="CommandLineParser" Version="2.4.3" />
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.1.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.5.0" />
<PackageReference Include="System.Management" Version="4.5.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<AssemblyTitle>BenchmarkDotNet.IntegrationTests.ConfigPerAssembly</AssemblyTitle>
<TargetFrameworks>net46;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>BenchmarkDotNet.IntegrationTests.ConfigPerAssembly</AssemblyName>
<PackageId>BenchmarkDotNet.IntegrationTests.ConfigPerAssembly</PackageId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<AssemblyTitle>BenchmarkDotNet.IntegrationTests.CustomPaths</AssemblyTitle>
<TargetFramework>net46</TargetFramework>
<TargetFramework>net461</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>BenchmarkDotNet.IntegrationTests.CustomPaths</AssemblyName>
<PackageId>BenchmarkDotNet.IntegrationTests.CustomPaths</PackageId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<AssemblyTitle>BenchmarkDotNet.IntegrationTests.DisabledOptimizations</AssemblyTitle>
<TargetFrameworks>net46;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>BenchmarkDotNet.IntegrationTests.DisabledOptimizations</AssemblyName>
<PackageId>BenchmarkDotNet.IntegrationTests.DisabledOptimizations</PackageId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<AssemblyTitle>BenchmarkDotNet.IntegrationTests.EnabledOptimizations</AssemblyTitle>
<TargetFrameworks>net46;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>BenchmarkDotNet.IntegrationTests.EnabledOptimizations</AssemblyName>
<PackageId>BenchmarkDotNet.IntegrationTests.EnabledOptimizations</PackageId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
<PublicSign>false</PublicSign>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<AssemblyTitle>BenchmarkDotNet.IntegrationTests.ManualRunning</AssemblyTitle>
<TargetFrameworks>net46;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>BenchmarkDotNet.IntegrationTests.ManualRunning</AssemblyName>
<PackageId>BenchmarkDotNet.IntegrationTests.ManualRunning</PackageId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<AssemblyTitle>BenchmarkDotNet.IntegrationTests</AssemblyTitle>
<TargetFrameworks>net46;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>BenchmarkDotNet.IntegrationTests</AssemblyName>
<PackageId>BenchmarkDotNet.IntegrationTests</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion tests/BenchmarkDotNet.Tests/BenchmarkDotNet.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="..\..\build\common.props" />
<PropertyGroup>
<AssemblyTitle>BenchmarkDotNet.Tests</AssemblyTitle>
<TargetFrameworks>net46;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<AssemblyName>BenchmarkDotNet.Tests</AssemblyName>
<PackageId>BenchmarkDotNet.Tests</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
Expand Down