diff --git a/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.Generic/Reqnroll.VisualStudio.ReqnrollConnector.Generic.csproj b/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.Generic/Reqnroll.VisualStudio.ReqnrollConnector.Generic.csproj index d9249d23..97ad4123 100644 --- a/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.Generic/Reqnroll.VisualStudio.ReqnrollConnector.Generic.csproj +++ b/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.Generic/Reqnroll.VisualStudio.ReqnrollConnector.Generic.csproj @@ -12,9 +12,10 @@ - - - + + + + diff --git a/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.V1/FakeTestContext.cs b/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.V1/FakeTestContext.cs index 0af10bf8..dc213fc6 100644 --- a/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.V1/FakeTestContext.cs +++ b/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.V1/FakeTestContext.cs @@ -4,7 +4,6 @@ using System.Data.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; -// ReSharper disable once CheckNamespace namespace Reqnroll.VisualStudio.ReqnrollConnector.Discovery; internal class FakeTestContext : TestContext @@ -15,27 +14,37 @@ internal class FakeTestContext : TestContext public override DbConnection DataConnection => throw new NotImplementedException(); - public override void AddResultFile(string? fileName) + public override void AddResultFile(string fileName) { throw new NotImplementedException(); } - public override void Write(string? message) + public override void BeginTimer(string timerName) { throw new NotImplementedException(); } - public override void Write(string? format, params object?[] args) + public override void EndTimer(string timerName) { throw new NotImplementedException(); } - public override void WriteLine(string? message) + public override void Write(string message) { throw new NotImplementedException(); } - public override void WriteLine(string? format, params object?[] args) + public override void Write(string format, params object[] args) + { + throw new NotImplementedException(); + } + + public override void WriteLine(string message) + { + throw new NotImplementedException(); + } + + public override void WriteLine(string format, params object[] args) { throw new NotImplementedException(); } diff --git a/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.V1/Reqnroll.VisualStudio.ReqnrollConnector.V1.csproj b/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.V1/Reqnroll.VisualStudio.ReqnrollConnector.V1.csproj index 9099e32d..d15f4194 100644 --- a/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.V1/Reqnroll.VisualStudio.ReqnrollConnector.V1.csproj +++ b/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.V1/Reqnroll.VisualStudio.ReqnrollConnector.V1.csproj @@ -13,14 +13,15 @@ - + - + - + @@ -30,24 +31,31 @@ - + - <_FilesToCopy Include="$(OutputPath)\*" Exclude="$(OutputPath)\TechTalk.*;$(OutputPath)\System.*;$(OutputPath)\Gherkin.*;$(OutputPath)\*.exe.config" /> + <_FilesToCopy Include="$(OutputPath)\*" + Exclude="$(OutputPath)\TechTalk.*;$(OutputPath)\System.*;$(OutputPath)\Gherkin.*;$(OutputPath)\*.exe.config" /> - + - + - + diff --git a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.Generic/AssemblyLoading/TestAssemblyLoadContext.cs b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.Generic/AssemblyLoading/TestAssemblyLoadContext.cs index dad4175b..e963686c 100644 --- a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.Generic/AssemblyLoading/TestAssemblyLoadContext.cs +++ b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.Generic/AssemblyLoading/TestAssemblyLoadContext.cs @@ -1,4 +1,6 @@ -namespace SpecFlowConnector.AssemblyLoading; +using RuntimeEnvironment = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment; + +namespace SpecFlowConnector.AssemblyLoading; public class TestAssemblyLoadContext : AssemblyLoadContext { @@ -43,7 +45,7 @@ private RuntimeFallbacks GetRuntimeFallbacks() ? _dependencyContext.RuntimeGraph : DependencyContext.Default.RuntimeGraph; - var rid = Environment.OSVersion.Platform.ToString(); + var rid = RuntimeEnvironment.GetRuntimeIdentifier(); var fallbackRid = GetFallbackRid(); var fallbackGraph = ridGraph.FirstOrDefault(g => g.Runtime == rid) ?? ridGraph.FirstOrDefault(g => g.Runtime == fallbackRid) diff --git a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.Generic/SpecFlow.VisualStudio.SpecFlowConnector.Generic.csproj b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.Generic/SpecFlow.VisualStudio.SpecFlowConnector.Generic.csproj index 8055a51f..b8940292 100644 --- a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.Generic/SpecFlow.VisualStudio.SpecFlowConnector.Generic.csproj +++ b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.Generic/SpecFlow.VisualStudio.SpecFlowConnector.Generic.csproj @@ -12,10 +12,13 @@ - - + + - + + + + diff --git a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V1/FakeTestContext.cs b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V1/FakeTestContext.cs index badf21e5..fa048e7c 100644 --- a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V1/FakeTestContext.cs +++ b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V1/FakeTestContext.cs @@ -4,7 +4,6 @@ using System.Data.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; -// ReSharper disable once CheckNamespace namespace SpecFlow.VisualStudio.SpecFlowConnector.Discovery; internal class FakeTestContext : TestContext @@ -20,22 +19,32 @@ public override void AddResultFile(string fileName) throw new NotImplementedException(); } - public override void Write(string? message) + public override void BeginTimer(string timerName) { throw new NotImplementedException(); } - public override void Write(string format, params object?[] args) + public override void EndTimer(string timerName) { throw new NotImplementedException(); } - public override void WriteLine(string? message) + public override void Write(string message) { throw new NotImplementedException(); } - public override void WriteLine(string format, params object?[] args) + public override void Write(string format, params object[] args) + { + throw new NotImplementedException(); + } + + public override void WriteLine(string message) + { + throw new NotImplementedException(); + } + + public override void WriteLine(string format, params object[] args) { throw new NotImplementedException(); } diff --git a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V1/SpecFlow.VisualStudio.SpecFlowConnector.V1.csproj b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V1/SpecFlow.VisualStudio.SpecFlowConnector.V1.csproj index 58b8e1ad..e293e44b 100644 --- a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V1/SpecFlow.VisualStudio.SpecFlowConnector.V1.csproj +++ b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V1/SpecFlow.VisualStudio.SpecFlowConnector.V1.csproj @@ -13,14 +13,15 @@ - + - + - + @@ -30,24 +31,31 @@ - + - <_FilesToCopy Include="$(OutputPath)\*" Exclude="$(OutputPath)\TechTalk.*;$(OutputPath)\System.*;$(OutputPath)\Gherkin.*;$(OutputPath)\*.exe.config" /> + <_FilesToCopy Include="$(OutputPath)\*" + Exclude="$(OutputPath)\TechTalk.*;$(OutputPath)\System.*;$(OutputPath)\Gherkin.*;$(OutputPath)\*.exe.config" /> - + - + - + diff --git a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V2/SpecFlow.VisualStudio.SpecFlowConnector.V2.csproj b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V2/SpecFlow.VisualStudio.SpecFlowConnector.V2.csproj index 34d6c7ae..94b20d09 100644 --- a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V2/SpecFlow.VisualStudio.SpecFlowConnector.V2.csproj +++ b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V2/SpecFlow.VisualStudio.SpecFlowConnector.V2.csproj @@ -13,15 +13,17 @@ - - - - + + + + - + @@ -29,10 +31,13 @@ <_FilesToCopy Include="$(OutputPath)\*" /> - + - + diff --git a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V2/TestAssemblyLoadContext.cs b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V2/TestAssemblyLoadContext.cs index d41535c1..ff092dbb 100644 --- a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V2/TestAssemblyLoadContext.cs +++ b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V2/TestAssemblyLoadContext.cs @@ -1,4 +1,6 @@ #nullable disable +using RuntimeEnvironment = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment; + namespace SpecFlow.VisualStudio.SpecFlowConnector; public class TestAssemblyLoadContext : AssemblyLoadContext @@ -57,8 +59,7 @@ private RuntimeFallbacks GetRuntimeFallbacks() ? _dependencyContext.RuntimeGraph : DependencyContext.Default.RuntimeGraph; - //var rid = RuntimeEnvironment.GetRuntimeIdentifier(); - var rid = Environment.OSVersion.Platform.ToString(); + var rid = RuntimeEnvironment.GetRuntimeIdentifier(); var fallbackRid = GetFallbackRid(); var fallbackGraph = ridGraph.FirstOrDefault(g => g.Runtime == rid) ?? ridGraph.FirstOrDefault(g => g.Runtime == fallbackRid) diff --git a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V3/SpecFlow.VisualStudio.SpecFlowConnector.V3.csproj b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V3/SpecFlow.VisualStudio.SpecFlowConnector.V3.csproj index 1dc96ff4..2239edee 100644 --- a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V3/SpecFlow.VisualStudio.SpecFlowConnector.V3.csproj +++ b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V3/SpecFlow.VisualStudio.SpecFlowConnector.V3.csproj @@ -13,33 +13,40 @@ - - + + - - - + + + - + - + <_FilesToCopy Include="$(OutputPath)\*" /> - + - + diff --git a/Reqnroll.VisualStudio.Package/ImplicitUsings.cs b/Reqnroll.VisualStudio.Package/ImplicitUsings.cs index 789f04f9..13816e8d 100644 --- a/Reqnroll.VisualStudio.Package/ImplicitUsings.cs +++ b/Reqnroll.VisualStudio.Package/ImplicitUsings.cs @@ -34,7 +34,6 @@ global using System.Collections.Immutable; global using System.ComponentModel.Composition; global using System.Diagnostics; -global using System.IO; global using System.IO.Abstractions; global using System.Reflection; global using System.Runtime.CompilerServices; diff --git a/Reqnroll.VisualStudio.Package/ProjectSystem/VsIdeScopeLoader.cs b/Reqnroll.VisualStudio.Package/ProjectSystem/VsIdeScopeLoader.cs index 79ead085..34c70f5e 100644 --- a/Reqnroll.VisualStudio.Package/ProjectSystem/VsIdeScopeLoader.cs +++ b/Reqnroll.VisualStudio.Package/ProjectSystem/VsIdeScopeLoader.cs @@ -105,7 +105,7 @@ private void MonitorLoadProjectSystem() public bool IsSolutionLoaded => VsIdeScope.IsSolutionLoaded; - public IProjectScope? GetProject(ITextBuffer textBuffer) => VsIdeScope.GetProject(textBuffer); + public IProjectScope GetProject(ITextBuffer textBuffer) => VsIdeScope.GetProject(textBuffer); public IDeveroomLogger Logger => VsIdeScope.Logger; public IMonitoringService MonitoringService => VsIdeScope.MonitoringService; diff --git a/Reqnroll.VisualStudio.Package/Reqnroll.VisualStudio.Package.csproj b/Reqnroll.VisualStudio.Package/Reqnroll.VisualStudio.Package.csproj index a89a682c..129ebd09 100644 --- a/Reqnroll.VisualStudio.Package/Reqnroll.VisualStudio.Package.csproj +++ b/Reqnroll.VisualStudio.Package/Reqnroll.VisualStudio.Package.csproj @@ -1,7 +1,6 @@  net481 - true true ..\reqnroll.snk True @@ -58,7 +57,7 @@ all runtime; build; native; contentfiles; analyzers - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Reqnroll.VisualStudio/Diagnostics/LogMessage.cs b/Reqnroll.VisualStudio/Diagnostics/LogMessage.cs index 21c81fbd..a1edb978 100644 --- a/Reqnroll.VisualStudio/Diagnostics/LogMessage.cs +++ b/Reqnroll.VisualStudio/Diagnostics/LogMessage.cs @@ -5,7 +5,7 @@ public record LogMessage( TraceLevel Level, string Message, string CallerMethod, - Exception? Exception = default!) + [CanBeNull] Exception Exception = default!) { public DateTimeOffset TimeStamp { get; } = DateTimeOffset.Now; public int ManagedThreadId { get; } = Thread.CurrentThread.ManagedThreadId; diff --git a/Reqnroll.VisualStudio/ImplicitUsings.cs b/Reqnroll.VisualStudio/ImplicitUsings.cs index 4f3b66d6..904120b4 100644 --- a/Reqnroll.VisualStudio/ImplicitUsings.cs +++ b/Reqnroll.VisualStudio/ImplicitUsings.cs @@ -52,7 +52,6 @@ global using System.Collections.ObjectModel; global using System.ComponentModel; global using System.ComponentModel.Composition; -global using System.IO; global using System.IO.Abstractions; global using System.Runtime.CompilerServices; global using System.Runtime.InteropServices; diff --git a/Reqnroll.VisualStudio/Reqnroll.VisualStudio.csproj b/Reqnroll.VisualStudio/Reqnroll.VisualStudio.csproj index d3067bef..656d3394 100644 --- a/Reqnroll.VisualStudio/Reqnroll.VisualStudio.csproj +++ b/Reqnroll.VisualStudio/Reqnroll.VisualStudio.csproj @@ -2,7 +2,6 @@ net481 - true true ..\reqnroll.snk TRACE; @@ -16,13 +15,13 @@ - - + + - + diff --git a/Tests/Connector/Reqnroll.VisualStudio.ReqnrollConnector.Tests/Reqnroll.VisualStudio.ReqnrollConnector.Tests.csproj b/Tests/Connector/Reqnroll.VisualStudio.ReqnrollConnector.Tests/Reqnroll.VisualStudio.ReqnrollConnector.Tests.csproj index 1e09c057..8ee9106e 100644 --- a/Tests/Connector/Reqnroll.VisualStudio.ReqnrollConnector.Tests/Reqnroll.VisualStudio.ReqnrollConnector.Tests.csproj +++ b/Tests/Connector/Reqnroll.VisualStudio.ReqnrollConnector.Tests/Reqnroll.VisualStudio.ReqnrollConnector.Tests.csproj @@ -12,17 +12,17 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/Tests/Connector/Reqnroll.VisualStudio.ReqnrollConnector.V1.Tests/Reqnroll.VisualStudio.ReqnrollConnector.V1.Tests.csproj b/Tests/Connector/Reqnroll.VisualStudio.ReqnrollConnector.V1.Tests/Reqnroll.VisualStudio.ReqnrollConnector.V1.Tests.csproj index 2efd8052..0a6bd565 100644 --- a/Tests/Connector/Reqnroll.VisualStudio.ReqnrollConnector.V1.Tests/Reqnroll.VisualStudio.ReqnrollConnector.V1.Tests.csproj +++ b/Tests/Connector/Reqnroll.VisualStudio.ReqnrollConnector.V1.Tests/Reqnroll.VisualStudio.ReqnrollConnector.V1.Tests.csproj @@ -8,10 +8,10 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers diff --git a/Tests/Reqnroll.SampleProjectGenerator.Core/Reqnroll.SampleProjectGenerator.Core.csproj b/Tests/Reqnroll.SampleProjectGenerator.Core/Reqnroll.SampleProjectGenerator.Core.csproj index 8fc47105..c4208125 100644 --- a/Tests/Reqnroll.SampleProjectGenerator.Core/Reqnroll.SampleProjectGenerator.Core.csproj +++ b/Tests/Reqnroll.SampleProjectGenerator.Core/Reqnroll.SampleProjectGenerator.Core.csproj @@ -10,7 +10,7 @@ - + diff --git a/Tests/Reqnroll.SampleProjectGenerator/Reqnroll.SampleProjectGenerator.csproj b/Tests/Reqnroll.SampleProjectGenerator/Reqnroll.SampleProjectGenerator.csproj index 5135da17..86ff526d 100644 --- a/Tests/Reqnroll.SampleProjectGenerator/Reqnroll.SampleProjectGenerator.csproj +++ b/Tests/Reqnroll.SampleProjectGenerator/Reqnroll.SampleProjectGenerator.csproj @@ -7,7 +7,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Tests/Reqnroll.VisualStudio.Specs/Reqnroll.VisualStudio.Specs.csproj b/Tests/Reqnroll.VisualStudio.Specs/Reqnroll.VisualStudio.Specs.csproj index 83c94561..12a0c5be 100644 --- a/Tests/Reqnroll.VisualStudio.Specs/Reqnroll.VisualStudio.Specs.csproj +++ b/Tests/Reqnroll.VisualStudio.Specs/Reqnroll.VisualStudio.Specs.csproj @@ -1,4 +1,4 @@ - + net481 true @@ -8,20 +8,22 @@ - - - - - - + + + + + + + all runtime; build; native; contentfiles; analyzers - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + + diff --git a/Tests/Reqnroll.VisualStudio.Tests/Reqnroll.VisualStudio.Tests.csproj b/Tests/Reqnroll.VisualStudio.Tests/Reqnroll.VisualStudio.Tests.csproj index d10387b1..b0b6c441 100644 --- a/Tests/Reqnroll.VisualStudio.Tests/Reqnroll.VisualStudio.Tests.csproj +++ b/Tests/Reqnroll.VisualStudio.Tests/Reqnroll.VisualStudio.Tests.csproj @@ -1,4 +1,4 @@ - + net481 true @@ -10,13 +10,13 @@ - - - - - - - + + + + + + + all runtime; build; native; contentfiles; analyzers diff --git a/Tests/Reqnroll.VisualStudio.VsxStubs/ImplicitUsings.cs b/Tests/Reqnroll.VisualStudio.VsxStubs/ImplicitUsings.cs index febd9c68..bdc41c38 100644 --- a/Tests/Reqnroll.VisualStudio.VsxStubs/ImplicitUsings.cs +++ b/Tests/Reqnroll.VisualStudio.VsxStubs/ImplicitUsings.cs @@ -30,7 +30,6 @@ global using System.Collections.Concurrent; global using System.Collections.Immutable; global using System.Diagnostics; -global using System.IO; global using System.IO.Abstractions; global using System.IO.Abstractions.TestingHelpers; global using System.Runtime.CompilerServices; diff --git a/Tests/Reqnroll.VisualStudio.VsxStubs/Reqnroll.VisualStudio.VsxStubs.csproj b/Tests/Reqnroll.VisualStudio.VsxStubs/Reqnroll.VisualStudio.VsxStubs.csproj index 6ac357af..0d710180 100644 --- a/Tests/Reqnroll.VisualStudio.VsxStubs/Reqnroll.VisualStudio.VsxStubs.csproj +++ b/Tests/Reqnroll.VisualStudio.VsxStubs/Reqnroll.VisualStudio.VsxStubs.csproj @@ -1,7 +1,6 @@ net481 - true true ..\..\reqnroll.snk $(MSBuildThisFileDirectory)..\ExternalTestDependencies\VS\ @@ -11,9 +10,9 @@ - - - + + +