diff --git a/appveyor.yml b/appveyor.yml
index 5ed497a4..8f326ca5 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,5 +1,7 @@
version: '{build}'
-image: ubuntu2004
+image:
+- ubuntu2004
+- Visual Studio 2019
skip_branch_with_pr: true
pull_requests:
@@ -15,17 +17,6 @@ branches:
- /release-.*/
- /^\d+\.\d+\.\d+(-\S*)?$/
-skip_commits:
- files:
- - '**/*.source.md'
-
-before_build:
-- sh: sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
-- sh: sudo chmod +x /usr/local/bin/docker-compose
-
-build_script:
-- sh: ./build.sh
-
artifacts:
- path: ./**/*.nupkg
type: NuGetPackage
@@ -34,3 +25,27 @@ artifacts:
test: off
deploy: off
+
+for:
+-
+ matrix:
+ only:
+ - image: ubuntu2004
+
+ before_build:
+ - sh: sudo curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
+ - sh: sudo chmod +x /usr/local/bin/docker-compose
+
+ build_script:
+ - sh: ./build.sh
+
+-
+ matrix:
+ only:
+ - image: Visual Studio 2019
+
+ before_build:
+ - cmd: docker-switch-linux
+
+ build_script:
+ - cmd: .\build.cmd
diff --git a/src/MyOtherService/MyOtherService.csproj b/src/MyOtherService/MyOtherService.csproj
index c2bcbca0..4a37c509 100644
--- a/src/MyOtherService/MyOtherService.csproj
+++ b/src/MyOtherService/MyOtherService.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp3.1
+ netcoreapp3.1;net48
latest
diff --git a/src/MyService/MyService.csproj b/src/MyService/MyService.csproj
index 135da28d..f331ac6f 100644
--- a/src/MyService/MyService.csproj
+++ b/src/MyService/MyService.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp3.1
+ netcoreapp3.1;net48
latest
diff --git a/src/MySystem.AcceptanceTests/DockerCompose.cs b/src/MySystem.AcceptanceTests/DockerCompose.cs
index 6606c866..757cb70a 100644
--- a/src/MySystem.AcceptanceTests/DockerCompose.cs
+++ b/src/MySystem.AcceptanceTests/DockerCompose.cs
@@ -1,8 +1,15 @@
using System;
-using System.Net.Http;
using System.Threading.Tasks;
using static SimpleExec.Command;
+#if NETCOREAPP
+using System.Net.Http;
+#endif
+
+#if NET48
+using System.Net;
+#endif
+
namespace MySystem.AcceptanceTests
{
public static class DockerCompose
@@ -16,9 +23,18 @@ static async Task statusChecker()
{
try
{
+ var managementUrl = "http://localhost:15672/";
+#if NETCOREAPP
using var client = new HttpClient();
- var response = await client.GetAsync("http://localhost:15672/");
+ var response = await client.GetAsync(managementUrl);
return response.IsSuccessStatusCode;
+#endif
+
+#if NET48
+ var request = HttpWebRequest.Create(managementUrl);
+ var response = await request.GetResponseAsync();
+ return ((HttpWebResponse)response).StatusCode == HttpStatusCode.OK;
+#endif
}
catch
{
diff --git a/src/MySystem.AcceptanceTests/MySystem.AcceptanceTests.csproj b/src/MySystem.AcceptanceTests/MySystem.AcceptanceTests.csproj
index be00b828..c523866c 100644
--- a/src/MySystem.AcceptanceTests/MySystem.AcceptanceTests.csproj
+++ b/src/MySystem.AcceptanceTests/MySystem.AcceptanceTests.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ netcoreapp3.1;net48
false
@@ -15,6 +15,10 @@
+
+
+
+
diff --git a/src/NServiceBus.AssemblyScanner.Extensions/NServiceBus.AssemblyScanner.Extensions.csproj b/src/NServiceBus.AssemblyScanner.Extensions/NServiceBus.AssemblyScanner.Extensions.csproj
index e27502c5..b25ea46c 100644
--- a/src/NServiceBus.AssemblyScanner.Extensions/NServiceBus.AssemblyScanner.Extensions.csproj
+++ b/src/NServiceBus.AssemblyScanner.Extensions/NServiceBus.AssemblyScanner.Extensions.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netcoreapp3.1;net48
diff --git a/src/NServiceBus.IntegrationTesting.Tests.TestEndpoint/NServiceBus.IntegrationTesting.Tests.TestEndpoint.csproj b/src/NServiceBus.IntegrationTesting.Tests.TestEndpoint/NServiceBus.IntegrationTesting.Tests.TestEndpoint.csproj
index 2a9d94f6..fedc321a 100644
--- a/src/NServiceBus.IntegrationTesting.Tests.TestEndpoint/NServiceBus.IntegrationTesting.Tests.TestEndpoint.csproj
+++ b/src/NServiceBus.IntegrationTesting.Tests.TestEndpoint/NServiceBus.IntegrationTesting.Tests.TestEndpoint.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp3.1
+ netcoreapp3.1;net48
latest
diff --git a/src/NServiceBus.IntegrationTesting.Tests/API/ApiApprovals.cs b/src/NServiceBus.IntegrationTesting.Tests/API/ApiApprovals.cs
index 31513c33..5595e891 100644
--- a/src/NServiceBus.IntegrationTesting.Tests/API/ApiApprovals.cs
+++ b/src/NServiceBus.IntegrationTesting.Tests/API/ApiApprovals.cs
@@ -1,5 +1,6 @@
using System.Runtime.CompilerServices;
using ApprovalTests;
+using ApprovalTests.Namers;
using ApprovalTests.Reporters;
using NUnit.Framework;
using PublicApiGenerator;
@@ -11,6 +12,12 @@ public class APIApprovals
[Test]
[UseReporter(typeof(DiffReporter))]
[MethodImpl(MethodImplOptions.NoInlining)]
+#if NETCOREAPP
+ [UseApprovalSubdirectory("NETCOREAPP")]
+#endif
+#if NET48
+ [UseApprovalSubdirectory("NET48")]
+#endif
public void Approve_API()
{
var publicApi = typeof(IntegrationScenarioContext).Assembly.GeneratePublicApi();
diff --git a/src/NServiceBus.IntegrationTesting.Tests/API/NET48/APIApprovals.Approve_API.approved.txt b/src/NServiceBus.IntegrationTesting.Tests/API/NET48/APIApprovals.Approve_API.approved.txt
new file mode 100644
index 00000000..18fe3bd8
--- /dev/null
+++ b/src/NServiceBus.IntegrationTesting.Tests/API/NET48/APIApprovals.Approve_API.approved.txt
@@ -0,0 +1,124 @@
+[assembly: System.Reflection.AssemblyMetadata("RepositoryUrl", "https://github.com/mauroservienti/NServiceBus.IntegrationTesting.git")]
+[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("NServiceBus.IntegrationTesting.Tests")]
+[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName=".NET Framework 4.8")]
+namespace NServiceBus.IntegrationTesting
+{
+ public class EmptyTestCompletionHandler : NServiceBus.IntegrationTesting.IHandleTestCompletion
+ {
+ public EmptyTestCompletionHandler() { }
+ public System.Threading.Tasks.Task OnTestCompleted(NServiceBus.AcceptanceTesting.Support.RunSummary summary) { }
+ }
+ public static class EndpointConfigurationExtensions
+ {
+ public static void RegisterRequiredPipelineBehaviors(this NServiceBus.EndpointConfiguration builder, string endpointName, NServiceBus.IntegrationTesting.IntegrationScenarioContext integrationScenarioContext) { }
+ public static void RegisterScenarioContext(this NServiceBus.EndpointConfiguration builder, NServiceBus.AcceptanceTesting.ScenarioContext scenarioContext) { }
+ }
+ public abstract class EndpointTemplate : NServiceBus.AcceptanceTesting.Support.IEndpointSetupTemplate
+ {
+ protected EndpointTemplate() { }
+ public System.Threading.Tasks.Task GetConfiguration(NServiceBus.AcceptanceTesting.Support.RunDescriptor runDescriptor, NServiceBus.AcceptanceTesting.Support.EndpointCustomizationConfiguration endpointCustomizationConfiguration, System.Action configurationBuilderCustomization) { }
+ protected abstract System.Threading.Tasks.Task OnGetConfiguration(NServiceBus.AcceptanceTesting.Support.RunDescriptor runDescriptor, NServiceBus.AcceptanceTesting.Support.EndpointCustomizationConfiguration endpointCustomizationConfiguration, System.Action configurationBuilderCustomization);
+ }
+ public class EndpointTemplate : NServiceBus.IntegrationTesting.EndpointTemplate
+ where T : NServiceBus.EndpointConfiguration, new ()
+ {
+ public EndpointTemplate() { }
+ protected override System.Threading.Tasks.Task OnGetConfiguration(NServiceBus.AcceptanceTesting.Support.RunDescriptor runDescriptor, NServiceBus.AcceptanceTesting.Support.EndpointCustomizationConfiguration endpointCustomizationConfiguration, System.Action configurationBuilderCustomization) { }
+ }
+ public class EndpointTemplate : NServiceBus.IntegrationTesting.EndpointTemplate
+ where T : NServiceBus.EndpointConfiguration, new ()
+ where C : NServiceBus.IntegrationTesting.IHandleTestCompletion, new ()
+ {
+ public EndpointTemplate() { }
+ protected override System.Threading.Tasks.Task OnGetConfiguration(NServiceBus.AcceptanceTesting.Support.RunDescriptor runDescriptor, NServiceBus.AcceptanceTesting.Support.EndpointCustomizationConfiguration endpointConfiguration, System.Action configurationBuilderCustomization) { }
+ }
+ public class GenericHostEndpointBehaviorBuilder
+ where TContext : NServiceBus.AcceptanceTesting.ScenarioContext
+ {
+ public GenericHostEndpointBehaviorBuilder() { }
+ public System.Collections.Generic.IList Whens { get; }
+ public NServiceBus.IntegrationTesting.GenericHostEndpointBehaviorBuilder When(System.Func action) { }
+ public NServiceBus.IntegrationTesting.GenericHostEndpointBehaviorBuilder When(System.Func action) { }
+ public NServiceBus.IntegrationTesting.GenericHostEndpointBehaviorBuilder When(System.Func> condition, System.Func action) { }
+ public NServiceBus.IntegrationTesting.GenericHostEndpointBehaviorBuilder When(System.Func> condition, System.Func action) { }
+ public NServiceBus.IntegrationTesting.GenericHostEndpointBehaviorBuilder When(System.Predicate condition, System.Func action) { }
+ public NServiceBus.IntegrationTesting.GenericHostEndpointBehaviorBuilder When(System.Predicate condition, System.Func action) { }
+ }
+ public class HandlerInvocation : NServiceBus.IntegrationTesting.Invocation
+ {
+ public HandlerInvocation() { }
+ public System.Type HandlerType { get; }
+ }
+ public interface IHandleTestCompletion
+ {
+ System.Threading.Tasks.Task OnTestCompleted(NServiceBus.AcceptanceTesting.Support.RunSummary summary);
+ }
+ public class IntegrationScenarioContext : NServiceBus.AcceptanceTesting.ScenarioContext
+ {
+ public IntegrationScenarioContext() { }
+ public System.Collections.Generic.IEnumerable InvokedHandlers { get; }
+ public System.Collections.Generic.IEnumerable InvokedSagas { get; }
+ public System.Collections.Generic.IEnumerable OutgoingMessageOperations { get; }
+ public bool HandlerWasInvoked() { }
+ public bool HasFailedMessages() { }
+ public bool HasHandlingErrors() { }
+ public bool MessageWasProcessed() { }
+ public bool MessageWasProcessedByHandler() { }
+ public bool MessageWasProcessedBySaga() { }
+ public void RegisterTimeoutRescheduleRule(System.Func
-
-
-
+
+
+
-
+
all
runtime; build; native; contentfiles; analyzers
diff --git a/targets/Program.cs b/targets/Program.cs
index 6423ed70..082f71fe 100644
--- a/targets/Program.cs
+++ b/targets/Program.cs
@@ -12,6 +12,8 @@ public static void Main(string[] args)
var sourceDir = "src";
var sdk = new DotnetSdkManager();
+ var isUnix = Environment.OSVersion.Platform == PlatformID.Unix;
+ var unixFx = "netcoreapp3.1";
Target("default", DependsOn("test"));
@@ -21,7 +23,7 @@ public static void Main(string[] args)
Target("test", DependsOn("build"),
Directory.EnumerateFiles(sourceDir, "*Tests.csproj", SearchOption.AllDirectories),
- proj => Run(sdk.GetDotnetCliPath(), $"test \"{proj}\" --configuration Release --no-build"));
+ proj => Run(sdk.GetDotnetCliPath(), $"test \"{proj}\" {(isUnix ? "--framework " + unixFx : "")} --configuration Release --no-build"));
RunTargetsAndExit(args);
}