Skip to content

Commit 5c519fb

Browse files
glennawatsonadamsitnik
authored andcommitted
Use .NET Standard 2.0 CommandLineParser, Update to net461 for NS2.0 support (#992)
* Use .NET Standard 2.0 CommandLineParser, Update to net461 for NS2.0 support * change to the newly released CommandLineParser 2.4.3 with NS 2.0 support
1 parent 5e44289 commit 5c519fb

File tree

17 files changed

+19
-19
lines changed

17 files changed

+19
-19
lines changed

build/common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<UseSharedCompilation>false</UseSharedCompilation>
1919
</PropertyGroup>
2020

21-
<PropertyGroup Condition=" '$(IsVisualBasic)' != 'true' And '$(TargetFramework)' == 'net46' ">
21+
<PropertyGroup Condition=" '$(IsVisualBasic)' != 'true' And $(TargetFramework.StartsWith('net4')) ">
2222
<DefineConstants>$(DefineConstants);CLASSIC</DefineConstants>
2323
</PropertyGroup>
2424
<PropertyGroup Condition=" '$(IsVisualBasic)' != 'true' And ('$(TargetFramework)' == 'netcoreapp2.0' Or '$(TargetFramework)' == 'netcoreapp2.1') ">

docs/articles/contributing/debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ There should be two debug profiles available in VS drop down
44

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

7-
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>`
7+
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>`

docs/articles/contributing/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Just add it to the top level of csproj.
1717
Specify a conditional dependency:
1818

1919
```xml
20-
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
20+
<ItemGroup Condition=" $(TargetFramework.StartsWith('net4')) ">
2121
<ProjectReference Include="..\..\src\BenchmarkDotNet.Diagnostics.Windows\BenchmarkDotNet.Diagnostics.Windows.csproj" />
2222
</ItemGroup>
2323
```

docs/articles/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ If you want to target netcoreapp1.0 in your main assembly, it's recommended to c
3333
[CoreJob, ClrJob, MonoJob]
3434
```
3535

36-
* **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?
36+
* **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?
3737

3838
**A** It's a good practice to introduce an additional console application (e.g. `MyAwesomeLibrary.Benchmarks`) which will depend on your code and BenchmarkDotNet.
3939
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.

samples/BenchmarkDotNet.Samples.FSharp/BenchmarkDotNet.Samples.FSharp.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
4+
<TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks>
55
</PropertyGroup>
66
<ItemGroup>
77
<Compile Include="Program.fs" />

samples/BenchmarkDotNet.Samples/BenchmarkDotNet.Samples.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="..\..\build\common.props" />
33
<PropertyGroup>
44
<AssemblyTitle>BenchmarkDotNet.Samples</AssemblyTitle>
5-
<TargetFrameworks>net46;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
5+
<TargetFrameworks>net461;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
66
<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>
77
<RuntimeIdentifiers Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">win7-x64;win7-x86</RuntimeIdentifiers>
88
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

src/BenchmarkDotNet.Diagnostics.Windows/BenchmarkDotNet.Diagnostics.Windows.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Description>Powerful .NET library for benchmarking (Diagnostic Tools for Windows)</Description>
55
<AssemblyTitle>BenchmarkDotNet.Diagnostics.Windows</AssemblyTitle>
6-
<TargetFrameworks>net46;netstandard2.0</TargetFrameworks>
6+
<TargetFrameworks>net461;netstandard2.0</TargetFrameworks>
77
<NoWarn>1701;1702;1705;1591;3001;3003;3002;3009</NoWarn>
88
<AssemblyName>BenchmarkDotNet.Diagnostics.Windows</AssemblyName>
99
<PackageId>BenchmarkDotNet.Diagnostics.Windows</PackageId>

src/BenchmarkDotNet/BenchmarkDotNet.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="..\..\build\common.props" />
33
<PropertyGroup>
44
<AssemblyTitle>BenchmarkDotNet</AssemblyTitle>
5-
<TargetFrameworks>net46;netstandard2.0;netcoreapp2.1</TargetFrameworks>
5+
<TargetFrameworks>net461;netstandard2.0;netcoreapp2.1</TargetFrameworks>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<NoWarn>$(NoWarn);1701;1702;1705;1591;3005</NoWarn>
88
<AssemblyName>BenchmarkDotNet</AssemblyName>
@@ -19,7 +19,7 @@
1919
<EmbeddedResource Include="Disassemblers\net46\win7-x64\Mono.Cecil.Rocks.dll" />
2020
<EmbeddedResource Include="Disassemblers\net46\win7-x64\Mono.Cecil.dll" />
2121
</ItemGroup>
22-
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
22+
<ItemGroup Condition=" $(TargetFramework.StartsWith('net4')) ">
2323
<ProjectReference Include="..\BenchmarkDotNet.Disassembler.x64\BenchmarkDotNet.Disassembler.x64.csproj">
2424
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
2525
</ProjectReference>
@@ -28,7 +28,7 @@
2828
</ProjectReference>
2929
</ItemGroup>
3030
<ItemGroup>
31-
<PackageReference Include="CommandLineParser" Version="2.3.0" />
31+
<PackageReference Include="CommandLineParser" Version="2.4.3" />
3232
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.1.0" />
3333
<PackageReference Include="Microsoft.Win32.Registry" Version="4.5.0" />
3434
<PackageReference Include="System.Management" Version="4.5.0" />

tests/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="..\..\build\common.props" />
33
<PropertyGroup>
44
<AssemblyTitle>BenchmarkDotNet.IntegrationTests.ConfigPerAssembly</AssemblyTitle>
5-
<TargetFrameworks>net46;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
5+
<TargetFrameworks>net461;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<AssemblyName>BenchmarkDotNet.IntegrationTests.ConfigPerAssembly</AssemblyName>
88
<PackageId>BenchmarkDotNet.IntegrationTests.ConfigPerAssembly</PackageId>

tests/BenchmarkDotNet.IntegrationTests.CustomPaths/BenchmarkDotNet.IntegrationTests.CustomPaths.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="..\..\build\common.props" />
33
<PropertyGroup>
44
<AssemblyTitle>BenchmarkDotNet.IntegrationTests.CustomPaths</AssemblyTitle>
5-
<TargetFramework>net46</TargetFramework>
5+
<TargetFramework>net461</TargetFramework>
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<AssemblyName>BenchmarkDotNet.IntegrationTests.CustomPaths</AssemblyName>
88
<PackageId>BenchmarkDotNet.IntegrationTests.CustomPaths</PackageId>

0 commit comments

Comments
 (0)