diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28e57ca5..cb5b3e8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,7 +53,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 8.0.x + dotnet-version: 9.0.x - id: versions name: Calculate versions shell: pwsh @@ -121,7 +121,7 @@ jobs: dotnet add ./Tests/Connector/Reqnroll.VisualStudio.ReqnrollConnector.Tests/Reqnroll.VisualStudio.ReqnrollConnector.Tests.csproj package GitHubActionsTestLogger dotnet add ./Tests/Connector/Reqnroll.VisualStudio.ReqnrollConnector.V1.Tests/Reqnroll.VisualStudio.ReqnrollConnector.V1.Tests.csproj package GitHubActionsTestLogger - name: Build - run: msbuild -property:DeployExtension=false -property:Configuration=${{ steps.versions.outputs.product_configuration }} ${{ steps.versions.outputs.build_params }} + run: msbuild -restore -target:Rebuild -property:DeployExtension=false -property:Configuration=${{ steps.versions.outputs.product_configuration }} ${{ steps.versions.outputs.build_params }} - name: Unit Tests run: dotnet test ./Tests/Reqnroll.VisualStudio.Tests/Reqnroll.VisualStudio.Tests.csproj ${{ steps.versions.outputs.test_params }} - name: Upload vsix diff --git a/CHANGELOG.md b/CHANGELOG.md index b43ab54c..036fd792 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ ## Improvements: -## Bug fixes: +*Added support for .NET 9 through the Visual Studio extension. -*Contributors of this release (in alphabetical order):* +*Contributors of this release (in alphabetical order):* @UL-ChrisGlew # v2024.6.176 - 2024-11-08 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..861bad6d 100644 --- a/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.Generic/Reqnroll.VisualStudio.ReqnrollConnector.Generic.csproj +++ b/Connectors/Reqnroll.VisualStudio.ReqnrollConnector.Generic/Reqnroll.VisualStudio.ReqnrollConnector.Generic.csproj @@ -3,7 +3,7 @@ Exe reqnroll-vs - net6.0;net7.0;net8.0 + net6.0;net7.0;net8.0;net9.0 true ..\..\reqnroll.snk true 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..e9337a13 100644 --- a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.Generic/SpecFlow.VisualStudio.SpecFlowConnector.Generic.csproj +++ b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.Generic/SpecFlow.VisualStudio.SpecFlowConnector.Generic.csproj @@ -3,7 +3,7 @@ Exe specflow-vs - net6.0;net7.0;net8.0 + net6.0;net7.0;net8.0;net9.0 true ..\..\reqnroll.snk true 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..c2d43b52 100644 --- a/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V3/SpecFlow.VisualStudio.SpecFlowConnector.V3.csproj +++ b/Connectors/SpecFlow.VisualStudio.SpecFlowConnector.V3/SpecFlow.VisualStudio.SpecFlowConnector.V3.csproj @@ -3,7 +3,7 @@ Exe specflow-vs - net6.0;net7.0;net8.0 + net6.0;net7.0;net8.0;net9.0 true ..\..\reqnroll.snk true diff --git a/Connectors/build.ps1 b/Connectors/build.ps1 index 45aef8e9..35c5702b 100644 --- a/Connectors/build.ps1 +++ b/Connectors/build.ps1 @@ -54,6 +54,10 @@ dotnet publish -f net8.0 $buildArgs Copy-Item bin\$configuration\net8.0\publish\ $outputFolder\Reqnroll-Generic-net8.0\ -Recurse +dotnet publish -f net9.0 $buildArgs + +Copy-Item bin\$configuration\net9.0\publish\ $outputFolder\Reqnroll-Generic-net9.0\ -Recurse + popd # build SpecFlow V1 any cpu @@ -104,6 +108,10 @@ dotnet publish -f net8.0 $buildArgs Copy-Item bin\$configuration\net8.0\publish\ $outputFolder\SpecFlow-V3-net8.0\ -Recurse +dotnet publish -f net9.0 $buildArgs + +Copy-Item bin\$configuration\net9.0\publish\ $outputFolder\SpecFlow-V3-net9.0\ -Recurse + cd .. # build SpecFlow generic any cpu @@ -122,4 +130,8 @@ dotnet publish -f net8.0 $buildArgs Copy-Item bin\$configuration\net8.0\publish\ $outputFolder\SpecFlow-Generic-net8.0\ -Recurse +dotnet publish -f net9.0 $buildArgs + +Copy-Item bin\$configuration\net9.0\publish\ $outputFolder\SpecFlow-Generic-net9.0\ -Recurse + popd diff --git a/Reqnroll.VisualStudio.ProjectTemplate/ProjectTemplate.csproj b/Reqnroll.VisualStudio.ProjectTemplate/ProjectTemplate.csproj index 5649147b..af39a4ff 100644 --- a/Reqnroll.VisualStudio.ProjectTemplate/ProjectTemplate.csproj +++ b/Reqnroll.VisualStudio.ProjectTemplate/ProjectTemplate.csproj @@ -8,13 +8,13 @@ $if$ ('$unittestframework$' == 'xUnit') - + $endif$$if$ ('$unittestframework$' == 'NUnit') - + $endif$$if$ ('$unittestframework$' == 'MSTest') - + $endif$$if$ ('$fluentassertionsincluded$' == 'True') $endif$ diff --git a/Reqnroll.VisualStudio.UI/Dialogs/AddNewReqnrollProjectDialog.xaml b/Reqnroll.VisualStudio.UI/Dialogs/AddNewReqnrollProjectDialog.xaml index c77d765b..1bd4cea0 100644 --- a/Reqnroll.VisualStudio.UI/Dialogs/AddNewReqnrollProjectDialog.xaml +++ b/Reqnroll.VisualStudio.UI/Dialogs/AddNewReqnrollProjectDialog.xaml @@ -233,7 +233,8 @@ .NET 6.0 .NET 7.0 .NET 8.0 - + .NET 9.0 + diff --git a/Reqnroll.VisualStudio/Connectors/GenericOutProcReqnrollConnector.cs b/Reqnroll.VisualStudio/Connectors/GenericOutProcReqnrollConnector.cs index b8fdc536..da52b09b 100644 --- a/Reqnroll.VisualStudio/Connectors/GenericOutProcReqnrollConnector.cs +++ b/Reqnroll.VisualStudio/Connectors/GenericOutProcReqnrollConnector.cs @@ -5,9 +5,11 @@ public class GenericOutProcReqnrollConnector : OutProcReqnrollConnector private const string ConnectorNet60 = @"Reqnroll-Generic-net6.0\reqnroll-vs.dll"; private const string ConnectorNet70 = @"Reqnroll-Generic-net7.0\reqnroll-vs.dll"; private const string ConnectorNet80 = @"Reqnroll-Generic-net8.0\reqnroll-vs.dll"; + private const string ConnectorNet90 = @"Reqnroll-Generic-net9.0\reqnroll-vs.dll"; private const string SpecFlowConnectorNet60 = @"SpecFlow-Generic-net6.0\specflow-vs.dll"; private const string SpecFlowConnectorNet70 = @"SpecFlow-Generic-net7.0\specflow-vs.dll"; private const string SpecFlowConnectorNet80 = @"SpecFlow-Generic-net8.0\specflow-vs.dll"; + private const string SpecFlowConnectorNet90 = @"SpecFlow-Generic-net9.0\specflow-vs.dll"; public GenericOutProcReqnrollConnector( DeveroomConfiguration configuration, @@ -46,6 +48,13 @@ protected override string GetConnectorPath(List arguments) SpecFlowConnectorNet80 : ConnectorNet80; } + if (_targetFrameworkMoniker.IsNetCore && _targetFrameworkMoniker.HasVersion && + _targetFrameworkMoniker.Version.Major >= 9) + { + connector = _projectSettings.IsSpecFlowProject ? + SpecFlowConnectorNet90 : ConnectorNet90; + } + var connectorsFolder = GetConnectorsFolder(); return GetDotNetExecCommand(arguments, connectorsFolder, connector); } diff --git a/Reqnroll.VisualStudio/ProjectSystem/TargetFrameworkMoniker.cs b/Reqnroll.VisualStudio/ProjectSystem/TargetFrameworkMoniker.cs index 60e9d263..25f900e1 100644 --- a/Reqnroll.VisualStudio/ProjectSystem/TargetFrameworkMoniker.cs +++ b/Reqnroll.VisualStudio/ProjectSystem/TargetFrameworkMoniker.cs @@ -14,6 +14,7 @@ public class TargetFrameworkMoniker private const string Net6ShortValuePrefix = "net6"; private const string Net7ShortValuePrefix = "net7"; private const string Net8ShortValuePrefix = "net8"; + private const string Net9ShortValuePrefix = "net9"; private TargetFrameworkMoniker(string value) { @@ -76,6 +77,10 @@ public static TargetFrameworkMoniker CreateFromShortName(string shortValue) { value = $".NETCoreApp,Version=v{shortValue.Substring(Net8ShortValuePrefix.Length - 1)}"; } + else if (shortValue.StartsWith(Net9ShortValuePrefix)) + { + value = $".NETCoreApp,Version=v{shortValue.Substring(Net9ShortValuePrefix.Length - 1)}"; + } else if (shortValue.StartsWith(NetFrameworkShortValuePrefix)) { if (shortValue.Length == 5) diff --git a/Tests/Reqnroll.VisualStudio.Specs/Features/Discovery/DiscoveryPlatformCompatibility.feature b/Tests/Reqnroll.VisualStudio.Specs/Features/Discovery/DiscoveryPlatformCompatibility.feature index 390abb03..c2eaae81 100644 --- a/Tests/Reqnroll.VisualStudio.Specs/Features/Discovery/DiscoveryPlatformCompatibility.feature +++ b/Tests/Reqnroll.VisualStudio.Specs/Features/Discovery/DiscoveryPlatformCompatibility.feature @@ -8,7 +8,8 @@ Scenario Outline: Discover bindings from a Reqnroll project in different .NET Co When the binding discovery performed Then the discovery succeeds with several step definitions Examples: - | framework | - | net6.0 | - | net7.0 | - | net8.0 | + | framework | + | net6.0 | + | net7.0 | + | net8.0 | + | net9.0 | diff --git a/Tests/Reqnroll.VisualStudio.Specs/Features/Discovery/SourceLocationDiscovery.feature b/Tests/Reqnroll.VisualStudio.Specs/Features/Discovery/SourceLocationDiscovery.feature index 47de2cf8..f3a388e3 100644 --- a/Tests/Reqnroll.VisualStudio.Specs/Features/Discovery/SourceLocationDiscovery.feature +++ b/Tests/Reqnroll.VisualStudio.Specs/Features/Discovery/SourceLocationDiscovery.feature @@ -28,3 +28,4 @@ Examples: | net6.0 | | net7.0 | | net8.0 | + | net9.0 | diff --git a/Tests/Reqnroll.VisualStudio.Specs/Support/DomainDefaults.cs b/Tests/Reqnroll.VisualStudio.Specs/Support/DomainDefaults.cs index 56f1a310..9e7d22b7 100644 --- a/Tests/Reqnroll.VisualStudio.Specs/Support/DomainDefaults.cs +++ b/Tests/Reqnroll.VisualStudio.Specs/Support/DomainDefaults.cs @@ -10,5 +10,5 @@ public static class DomainDefaults //TODO: calculate latest versions automatically public static NuGetVersion LatestSpecFlowV2Version = new("2.4.1", "2.4.1"); public static NuGetVersion LatestSpecFlowV3Version = new("3.6.23", "3.6.23"); - public static NuGetVersion LatestReqnrollVersion = new("2.0.2", "2.0.2"); + public static NuGetVersion LatestReqnrollVersion = new("2.2.1", "2.2.1"); }