Skip to content

Commit d482672

Browse files
committed
Fix list of external dependencies for netstandard1.6 to work better with netcoreapp1.0
1 parent 6b064a3 commit d482672

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2.1.0-alpha.{build}+{branch}
22
init:
3-
- git config --global core.autocrlf true
3+
- git config --global core.autocrlf input
44
clone_depth: 1
55
branches:
66
only:

build.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
param(
44
[ValidateSet('Debug', 'Release')]
55
$Configuration = $null,
6+
[switch]
7+
$IsOfficialBuild,
68
[Parameter(ValueFromRemainingArguments = $true)]
79
[string[]]$MSBuildArgs
810
)
@@ -26,15 +28,19 @@ function exec([string]$_cmd) {
2628
#
2729

2830
if (!$Configuration) {
29-
$Configuration = if ($env:CI) { 'Release' } else { 'Debug' }
31+
$Configuration = if ($env:CI -or $IsOfficialBuild) { 'Release' } else { 'Debug' }
32+
}
33+
34+
if ($IsOfficialBuild) {
35+
$MSBuildArgs += '-p:CI=true'
3036
}
3137

3238
$artifacts = "$PSScriptRoot/artifacts/"
3339

3440
Remove-Item -Recurse $artifacts -ErrorAction Ignore
3541

3642
exec dotnet restore @MSBuildArgs
37-
exec dotnet build --no-restore --configuration $Configuration
43+
exec dotnet build --no-restore --configuration $Configuration @MSBuildArgs
3844
exec dotnet pack --no-restore --no-build --configuration $Configuration -o $artifacts @MSBuildArgs
3945
exec dotnet test --no-restore --no-build --configuration $Configuration '-clp:Summary' `
4046
"$PSScriptRoot/test/CommandLineUtils.Tests/McMaster.Extensions.CommandLineUtils.Tests.csproj" `

src/CommandLineUtils/McMaster.Extensions.CommandLineUtils.csproj

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
23
<PropertyGroup>
34
<TargetFrameworks>netstandard2.0;netstandard1.6</TargetFrameworks>
45
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform(Windows))">$(TargetFrameworks);net45</TargetFrameworks>
@@ -16,9 +17,11 @@ McMaster.Extensions.CommandLineUtils.ArgumentEscaper
1617
<IncludeSymbols>true</IncludeSymbols>
1718
<IncludeSource>true</IncludeSource>
1819
</PropertyGroup>
20+
1921
<ItemGroup Condition="'$(TargetFramework)'=='netstandard1.6'">
20-
<PackageReference Include="System.AppContext" Version="4.3.0" />
21-
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
22-
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
22+
<PackageReference Include="System.Diagnostics.Process" Version="4.1.0" />
23+
<PackageReference Include="System.Threading.Thread" Version="4.0.0" />
24+
<PackageReference Update="NETStandard.Library" PrivateAssets="All" />
2325
</ItemGroup>
26+
2427
</Project>

0 commit comments

Comments
 (0)