Skip to content

Commit 384fcac

Browse files
committed
2.0.1: add .NETStandard 1.6
2 parents 25bd198 + 82a2d90 commit 384fcac

File tree

10 files changed

+51
-19
lines changed

10 files changed

+51
-19
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2.0.0-alpha.{build}+{branch}
1+
version: 2.0.1-rc.{build}+{branch}
22
init:
33
- git config --global core.autocrlf true
44
clone_depth: 1

CommandLineUtils.sln

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 15
3-
VisualStudioVersion = 15.0.26730.12
3+
VisualStudioVersion = 15.0.27004.2002
44
MinimumVisualStudioVersion = 15.0.26124.0
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{95D4B35E-0A21-4D64-8BAF-27DD6C019FC5}"
66
EndProject
@@ -14,6 +14,23 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{60B2
1414
EndProject
1515
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HelloWorld", "samples\HelloWorld\HelloWorld.csproj", "{71521E54-158D-45D7-8746-4905E6B3EB21}"
1616
EndProject
17+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "files", "files", "{509D6286-77FA-49C1-9EC6-7461DBE79536}"
18+
ProjectSection(SolutionItems) = preProject
19+
.appveyor.yml = .appveyor.yml
20+
.editorconfig = .editorconfig
21+
.gitattributes = .gitattributes
22+
.gitignore = .gitignore
23+
build.cmd = build.cmd
24+
build.ps1 = build.ps1
25+
Directory.Build.props = Directory.Build.props
26+
Directory.Build.targets = Directory.Build.targets
27+
LICENSE.txt = LICENSE.txt
28+
NOTICE.txt = NOTICE.txt
29+
NuGet.config = NuGet.config
30+
README.md = README.md
31+
version.props = version.props
32+
EndProjectSection
33+
EndProject
1734
Global
1835
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1936
Debug|Any CPU = Debug|Any CPU

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
2121

2222
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
23+
24+
<PackageReleaseNotes>2.0.1: Add .NETStandard 1.6 to the list of supported frameworks.</PackageReleaseNotes>
2325
</PropertyGroup>
2426

2527
</Project>

build.ps1

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,8 @@ $artifacts = "$PSScriptRoot/artifacts/"
3434
Remove-Item -Recurse $artifacts -ErrorAction Ignore
3535

3636
exec dotnet restore @MSBuildArgs
37-
exec dotnet pack `
38-
-c $Configuration `
39-
-o $artifacts `
40-
@MSBuildArgs
41-
exec dotnet test `
42-
-c $Configuration `
37+
exec dotnet build --no-restore -c $Configuration
38+
exec dotnet pack --no-restore --no-build -c $Configuration -o $artifacts @MSBuildArgs
39+
exec dotnet test --no-restore --no-build -c $Configuration `
4340
"$PSScriptRoot/test/CommandLineUtils.Tests/McMaster.Extensions.CommandLineUtils.Tests.csproj" `
4441
@MSBuildArgs

src/CommandLineUtils/McMaster.Extensions.CommandLineUtils.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net45;;netstandard1.6;netstandard2.0</TargetFrameworks>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
66
<IsPackable>true</IsPackable>
77
<Description>Command-line parsing API. A community-maintained fork of Microsoft.Extensions.CommandLineUtils, plus extras.
@@ -17,4 +17,10 @@ McMaster.Extensions.CommandLineUtils.ArgumentEscaper
1717
<IncludeSource>true</IncludeSource>
1818
</PropertyGroup>
1919

20+
<ItemGroup Condition="'$(TargetFramework)'=='netstandard1.6'">
21+
<PackageReference Include="System.AppContext" Version="4.3.0" />
22+
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
23+
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
24+
</ItemGroup>
25+
2026
</Project>

src/CommandLineUtils/Utilities/DotNetExe.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private static string TryFindDotNetExePath()
3838
{
3939
#if NET45
4040
return "dotnet.exe";
41-
#elif NETSTANDARD2_0
41+
#elif (NETSTANDARD1_6 || NETSTANDARD2_0)
4242
var fileName = FileName;
4343

4444
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
@@ -78,6 +78,8 @@ private static string TryFindDotNetExePath()
7878
return File.Exists(muxer)
7979
? muxer
8080
: null;
81+
#else
82+
#error Update target frameworks
8183
#endif
8284
}
8385
}

test/CommandLineUtils.Tests/DotNetExeTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
// This file has been modified from the original form. See Notice.txt in the project root for more information.
44

5-
#if NETCOREAPP2_0
5+
#if (NETCOREAPP1_0 || NETCOREAPP2_0)
66
using System.IO;
7-
using System.Runtime.InteropServices;
87
using Xunit;
98

109
namespace McMaster.Extensions.CommandLineUtils.Tests
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp2.0;net461</TargetFrameworks>
5-
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netcoreapp2.0</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp2.0;netcoreapp1.0</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform(Windows))">$(TargetFrameworks);net461</TargetFrameworks>
66
</PropertyGroup>
77

88
<ItemGroup>
@@ -11,9 +11,13 @@
1111

1212
<ItemGroup>
1313
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
14-
<PackageReference Include="Moq" Version="4.7.99" />
15-
<PackageReference Include="xunit" Version="2.3.0-beta5-build3769" />
16-
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-beta5-build3769" />
14+
<PackageReference Include="Moq" Version="4.7.142" />
15+
<PackageReference Include="xunit" Version="2.3.0" />
16+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.0" />
17+
</ItemGroup>
18+
19+
<ItemGroup>
20+
<None Update="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
1721
</ItemGroup>
1822

1923
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"methodDisplay": "method"
3+
}

version.props

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<Project>
22
<PropertyGroup>
3-
<VersionPrefix>2.0.0</VersionPrefix>
3+
<VersionPrefix>2.0.1</VersionPrefix>
4+
<!-- <VersionSuffix>rc</VersionSuffix> -->
45
<PackageVersion Condition="'$(APPVEYOR_REPO_TAG)' == 'true' AND '$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
56

67
<BuildNumber Condition=" '$(BuildNumber)' == '' ">$(APPVEYOR_BUILD_NUMBER)</BuildNumber>
78
<BuildNumber Condition=" '$(BuildNumber)' == '' ">0</BuildNumber>
89
<FileVersion>$(VersionPrefix).$(BuildNumber)</FileVersion>
9-
<VersionSuffix Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)-00$(BuildNumber)</VersionSuffix>
10+
<VersionSuffix Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix).$(BuildNumber)</VersionSuffix>
1011

1112
<BranchName Condition=" '$(BranchName)' == '' ">$(APPVEYOR_REPO_BRANCH)</BranchName>
13+
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BranchName)' != '' ">$(VersionSuffix)+$(BranchName)</VersionSuffix>
1214
</PropertyGroup>
1315

1416
<ItemGroup>

0 commit comments

Comments
 (0)