|
| 1 | +From b9a21ec1c0a77ef4e1e44840a0526545fea456de Mon Sep 17 00:00:00 2001 |
| 2 | +From: Davis Goodin < [email protected]> |
| 3 | +Date: Thu, 29 Oct 2020 01:48:54 -0500 |
| 4 | +Subject: [PATCH] Update to netcoreapp3.1 to avoid prebuilts |
| 5 | + |
| 6 | +netcoreapp3.1 avoids prebuilts (Microsoft.CSharp) but works with the |
| 7 | +rest of source-build: runtime and roslyn. |
| 8 | + |
| 9 | +Includes a code fix for ref nullability with the new framework. |
| 10 | +--- |
| 11 | + .../System.CommandLine.DragonFruit.csproj | 2 +- |
| 12 | + .../System.CommandLine.Hosting.csproj | 2 +- |
| 13 | + .../System.CommandLine.Rendering.csproj | 2 +- |
| 14 | + src/System.CommandLine/Binding/BindingContext.cs | 2 +- |
| 15 | + src/System.CommandLine/System.CommandLine.csproj | 7 +------ |
| 16 | + 5 files changed, 5 insertions(+), 10 deletions(-) |
| 17 | + |
| 18 | +diff --git a/src/System.CommandLine.DragonFruit/System.CommandLine.DragonFruit.csproj b/src/System.CommandLine.DragonFruit/System.CommandLine.DragonFruit.csproj |
| 19 | +index b3a542fd..06167997 100644 |
| 20 | +--- a/src/System.CommandLine.DragonFruit/System.CommandLine.DragonFruit.csproj |
| 21 | ++++ b/src/System.CommandLine.DragonFruit/System.CommandLine.DragonFruit.csproj |
| 22 | +@@ -1,7 +1,7 @@ |
| 23 | + <Project Sdk="Microsoft.NET.Sdk"> |
| 24 | + <PropertyGroup> |
| 25 | + <IsPackable>true</IsPackable> |
| 26 | +- <TargetFramework>netstandard2.0</TargetFramework> |
| 27 | ++ <TargetFramework>netcoreapp3.1</TargetFramework> |
| 28 | + <Description>This package includes the experimental DragonFruit app model for System.CommandLine, which allows you to create a command line application using only a Main method while getting support for complex type binding, error reporting, help, shell completions, and more. |
| 29 | + </Description> |
| 30 | + </PropertyGroup> |
| 31 | +diff --git a/src/System.CommandLine.Hosting/System.CommandLine.Hosting.csproj b/src/System.CommandLine.Hosting/System.CommandLine.Hosting.csproj |
| 32 | +index 1d00cff2..7342c1c5 100644 |
| 33 | +--- a/src/System.CommandLine.Hosting/System.CommandLine.Hosting.csproj |
| 34 | ++++ b/src/System.CommandLine.Hosting/System.CommandLine.Hosting.csproj |
| 35 | +@@ -2,7 +2,7 @@ |
| 36 | + |
| 37 | + <PropertyGroup> |
| 38 | + <IsPackable>true</IsPackable> |
| 39 | +- <TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks> |
| 40 | ++ <TargetFrameworks>netcoreapp3.1</TargetFrameworks> |
| 41 | + <LangVersion>latest</LangVersion> |
| 42 | + <Description>This package provides support for using System.CommandLine with Microsoft.Extensions.Hosting.</Description> |
| 43 | + </PropertyGroup> |
| 44 | +diff --git a/src/System.CommandLine.Rendering/System.CommandLine.Rendering.csproj b/src/System.CommandLine.Rendering/System.CommandLine.Rendering.csproj |
| 45 | +index d552286e..84026ebe 100644 |
| 46 | +--- a/src/System.CommandLine.Rendering/System.CommandLine.Rendering.csproj |
| 47 | ++++ b/src/System.CommandLine.Rendering/System.CommandLine.Rendering.csproj |
| 48 | +@@ -2,7 +2,7 @@ |
| 49 | + |
| 50 | + <PropertyGroup> |
| 51 | + <IsPackable>true</IsPackable> |
| 52 | +- <TargetFramework>netstandard2.0</TargetFramework> |
| 53 | ++ <TargetFramework>netcoreapp3.1</TargetFramework> |
| 54 | + <LangVersion>8</LangVersion> |
| 55 | + <Description>This package provides support for structured command line output rendering. Write code once that renders correctly in multiple output modes, including System.Console, virtual terminal (using ANSI escape sequences), and plain text. |
| 56 | + </Description> |
| 57 | +diff --git a/src/System.CommandLine/Binding/BindingContext.cs b/src/System.CommandLine/Binding/BindingContext.cs |
| 58 | +index b942ba6a..bbb83891 100644 |
| 59 | +--- a/src/System.CommandLine/Binding/BindingContext.cs |
| 60 | ++++ b/src/System.CommandLine/Binding/BindingContext.cs |
| 61 | +@@ -55,7 +55,7 @@ namespace System.CommandLine.Binding |
| 62 | + |
| 63 | + public ModelBinder GetModelBinder(IValueDescriptor valueDescriptor) |
| 64 | + { |
| 65 | +- if (_modelBindersByValueDescriptor.TryGetValue(valueDescriptor.ValueType, out ModelBinder binder)) |
| 66 | ++ if (_modelBindersByValueDescriptor.TryGetValue(valueDescriptor.ValueType, out ModelBinder? binder)) |
| 67 | + { |
| 68 | + return binder; |
| 69 | + } |
| 70 | +diff --git a/src/System.CommandLine/System.CommandLine.csproj b/src/System.CommandLine/System.CommandLine.csproj |
| 71 | +index aaa2c4a3..5e875a73 100644 |
| 72 | +--- a/src/System.CommandLine/System.CommandLine.csproj |
| 73 | ++++ b/src/System.CommandLine/System.CommandLine.csproj |
| 74 | +@@ -3,7 +3,7 @@ |
| 75 | + <PropertyGroup> |
| 76 | + <IsPackable>true</IsPackable> |
| 77 | + <PackageId>System.CommandLine</PackageId> |
| 78 | +- <TargetFramework>netstandard2.0</TargetFramework> |
| 79 | ++ <TargetFramework>netcoreapp3.1</TargetFramework> |
| 80 | + <LangVersion>8</LangVersion> |
| 81 | + <Nullable>enable</Nullable> |
| 82 | + <Description>This package includes a powerful command line parser and other tools for building command line applications, including: |
| 83 | +@@ -18,9 +18,4 @@ |
| 84 | + <Compile Include="..\System.Diagnostics.CodeAnalysis.cs" Link="System.Diagnostics.CodeAnalysis.cs" /> |
| 85 | + </ItemGroup> |
| 86 | + |
| 87 | +- <ItemGroup> |
| 88 | +- <PackageReference Include="Microsoft.CSharp" Version="$(MicrosoftCSharpPackageVersion)" /> |
| 89 | +- <PackageReference Include="system.memory" Version="$(SystemMemoryPackageVersion)" /> |
| 90 | +- </ItemGroup> |
| 91 | +- |
| 92 | + <ItemGroup> |
| 93 | +-- |
| 94 | +2.25.2 |
| 95 | + |
0 commit comments