From f6848c8346e74b4c811571c04347c8a3be44f97e Mon Sep 17 00:00:00 2001 From: Alex Ghiondea Date: Tue, 21 Apr 2020 12:27:24 -0700 Subject: [PATCH] Bump up dependencies. (#60) * Bump up dependencies. This pulls in the CommandLine version with .NET Standard 2.0 support, meaning we need to pull in that dependency as well when building the project. Also added a trait to one of the tests who was missing one. * Bump project version as well. --- .../CommandLine.Analyzer.Test.csproj | 4 ++-- .../Helpers/DiagnosticVerifier.Helper.cs | 5 ++++- src/CommandLine.csproj | 4 ++-- test/CommandLine.Tests.csproj | 9 ++++++--- test/CommandLineTests.Environment.cs | 1 + 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/analyzer/CommandLine.Analyzer.Test/CommandLine.Analyzer.Test.csproj b/analyzer/CommandLine.Analyzer.Test/CommandLine.Analyzer.Test.csproj index 4efa187..be3f930 100644 --- a/analyzer/CommandLine.Analyzer.Test/CommandLine.Analyzer.Test.csproj +++ b/analyzer/CommandLine.Analyzer.Test/CommandLine.Analyzer.Test.csproj @@ -6,12 +6,12 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/analyzer/CommandLine.Analyzer.Test/Helpers/DiagnosticVerifier.Helper.cs b/analyzer/CommandLine.Analyzer.Test/Helpers/DiagnosticVerifier.Helper.cs index 921eb0f..4ced457 100644 --- a/analyzer/CommandLine.Analyzer.Test/Helpers/DiagnosticVerifier.Helper.cs +++ b/analyzer/CommandLine.Analyzer.Test/Helpers/DiagnosticVerifier.Helper.cs @@ -18,7 +18,7 @@ namespace TestHelper public abstract partial class DiagnosticVerifier { // this is relative based on the CommandLine project. We are using Path.Combine for X-Plat support - private static readonly MetadataReference PathToCommandLineAssemblyToReference = MetadataReference.CreateFromFile(typeof(Parser).Assembly.Location); //Path.Combine("..","..","..","..","..","bin","Debug","netstandard1.5","CommandLine.dll"); + private static readonly MetadataReference PathToCommandLineAssemblyToReference = MetadataReference.CreateFromFile(typeof(Parser).Assembly.Location); private static readonly MetadataReference CorlibReference = MetadataReference.CreateFromFile(typeof(object).Assembly.Location); private static readonly MetadataReference SystemCoreReference = MetadataReference.CreateFromFile(typeof(Enumerable).Assembly.Location); @@ -156,6 +156,9 @@ private static Project CreateProject(string[] sources, string language = Languag refs.Add(MetadataReference.CreateFromFile(item)); } + // add netStandard.dll to the mix + var ns20 = Path.Combine(pathToSharedFx, "netstandard.dll"); + refs.Add(MetadataReference.CreateFromFile(ns20)); var solution = new AdhocWorkspace() .CurrentSolution diff --git a/src/CommandLine.csproj b/src/CommandLine.csproj index af7cd89..6d40402 100644 --- a/src/CommandLine.csproj +++ b/src/CommandLine.csproj @@ -7,9 +7,9 @@ - 2.1.2 + 2.1.3 $(AssemblyVersion) - 2.1.2 + 2.1.3 diff --git a/test/CommandLine.Tests.csproj b/test/CommandLine.Tests.csproj index 4037c27..3ad72c8 100644 --- a/test/CommandLine.Tests.csproj +++ b/test/CommandLine.Tests.csproj @@ -11,9 +11,12 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/test/CommandLineTests.Environment.cs b/test/CommandLineTests.Environment.cs index f09e3a9..c3c97c1 100644 --- a/test/CommandLineTests.Environment.cs +++ b/test/CommandLineTests.Environment.cs @@ -6,6 +6,7 @@ namespace CommandLine.Tests public partial class CommandLineTests { [Fact] + [Trait("Category", "Environment variable")] public void EnvironmentTest1() { ParserOptions po = new ParserOptions() { VariableNamePrefix = nameof(EnvironmentTest1) };