Skip to content

Commit

Permalink
Add package reference to .NET Framework ref assemblies for x-plat work
Browse files Browse the repository at this point in the history
Workaround dotnet/sdk#335
  • Loading branch information
busgaidw2 authored and natemcmaster committed Aug 15, 2018
1 parent 14ead6f commit fb48799
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@
<BaseOutputPath>$(MSBuildThisFileDirectory).build\bin\$(MSBuildProjectName)\</BaseOutputPath>
</PropertyGroup>

<ItemGroup>
<!-- For x-plat develpment. Workaround for https://github.com/dotnet/sdk/issues/335 -->
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-alpha-004" PrivateAssets="all" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="roslyntools" value="https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json" />
</packageSources>
</configuration>
</configuration>
7 changes: 7 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,15 @@ Remove-Item -Recurse $artifacts -ErrorAction Ignore

exec dotnet build --configuration $Configuration '-warnaserror:CS1591' @MSBuildArgs
exec dotnet pack --no-restore --no-build --configuration $Configuration -o $artifacts @MSBuildArgs

[string[]] $testArgs=@()
if (-not $IsCoreCLR -or -not $IsWindows) {
$testArgs += '--framework','netcoreapp2.1'
}

exec dotnet test --no-restore --no-build --configuration $Configuration '-clp:Summary' `
"$PSScriptRoot/test/CommandLineUtils.Tests/McMaster.Extensions.CommandLineUtils.Tests.csproj" `
@testArgs `
@MSBuildArgs

write-host -f magenta 'Done'
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard1.6</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform(Windows))">$(TargetFrameworks);net45</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard1.6;net45</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>true</IsPackable>
<Description>Command-line parsing API. A community-maintained fork of Microsoft.Extensions.CommandLineUtils, plus extras.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform(Windows))">$(TargetFrameworks);net461</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;net461</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit fb48799

Please sign in to comment.