Skip to content

Commit 82a2d90

Browse files
committed
Add netcoreapp1.0 to the test projects
1 parent 88c956c commit 82a2d90

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

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/Utilities/DotNetExe.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

test/CommandLineUtils.Tests/McMaster.Extensions.CommandLineUtils.Tests.csproj

Lines changed: 2 additions & 2 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>

0 commit comments

Comments
 (0)