Skip to content

Commit

Permalink
Target standard over Core2.0 when possible (#3126)
Browse files Browse the repository at this point in the history
It's harder for projects to depend on us if we're netcoreapp2.0, because
they must themselves be .NET Core specific rather than netstandard.

We only need to be netcoreapp2.1, though--in 2.0 mode we can be
netstandard.
  • Loading branch information
rainersigwald authored Mar 23, 2018
1 parent d348867 commit b5dc4cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ref/Microsoft.Build/netstandard/Microsoft.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ public enum NodeEngineShutdownReason
}
public partial class OutOfProcNode
{
public OutOfProcNode() { }
public OutOfProcNode(string clientToServerPipeHandle, string serverToClientPipeHandle) { }
public Microsoft.Build.Execution.NodeEngineShutdownReason Run(bool enableReuse, out System.Exception shutdownException) { shutdownException = default(System.Exception); throw null; }
public Microsoft.Build.Execution.NodeEngineShutdownReason Run(out System.Exception shutdownException) { shutdownException = default(System.Exception); throw null; }
}
Expand Down
13 changes: 8 additions & 5 deletions src/Build/Microsoft.Build.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(RuntimeOutputTargetFrameworks)</TargetFrameworks>
<!-- Node reuse requires an API new to .NET Core 2.1 not yet available
in .NETStandard. -->
<TargetFrameworks>netstandard2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks Condition="'$(OsEnvironment)'=='windows'">net46;netstandard2.0;netcoreapp2.1</TargetFrameworks>
<RootNamespace>Microsoft.Build</RootNamespace>
<AssemblyName>Microsoft.Build</AssemblyName>

Expand All @@ -10,8 +13,8 @@
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>

<!-- Generate API only for the more limited .NET Core flavor. -->
<GenerateReferenceAssemblySources Condition="'$(TargetFramework)' != 'netcoreapp2.0'">true</GenerateReferenceAssemblySources>
<!-- Generate API only for the more limited .NET Core/Standard flavor. -->
<GenerateReferenceAssemblySources Condition="'$(TargetFramework)' != 'netcoreapp2.1'">true</GenerateReferenceAssemblySources>
<CreateTlb>true</CreateTlb>
<IsPackable>true</IsPackable>
<Description>This package contains the $(MSBuildProjectName) assembly which is used to create, edit, and evaluate MSBuild projects.</Description>
Expand All @@ -35,11 +38,11 @@

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
<PackageReference Include="System.Diagnostics.TraceSource" Version="4.0.0" />
<PackageReference Include="System.IO.Pipes.AccessControl" Version="4.3.0" />
<PackageReference Include="System.IO.Pipes.AccessControl" Version="4.3.0" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
<PackageReference Include="System.Reflection.Metadata" Version="1.3.0" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.1.0" />
<PackageReference Include="System.Runtime.Loader" Version="4.0.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.3.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.3.0" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="4.0.1" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.6.0" />
</ItemGroup>
Expand Down

0 comments on commit b5dc4cf

Please sign in to comment.