diff --git a/.github/workflows/dotnet-release.yml b/.github/workflows/dotnet-release.yml
index 3234b47ffc..6d773e1428 100644
--- a/.github/workflows/dotnet-release.yml
+++ b/.github/workflows/dotnet-release.yml
@@ -18,12 +18,9 @@ jobs:
run: dotnet restore
- name: Build Release
run: dotnet build Castle.Windsor.sln -c Release
- - name: Castle.Windsor.Tests
- run: dotnet test src/Castle.Windsor.Tests
- - name: Castle.Windsor.Extensions.DependencyInjection.Tests
- run: dotnet test src/Castle.Windsor.Extensions.DependencyInjection.Tests
- - name: Castle.Facilities.AspNetCore.Tests
- run: dotnet test src/Castle.Facilities.AspNetCore.Tests
+ - name: Test on .NET 6.0
+ run: dotnet test -c Release -f net6.0 --no-build --no-restore -l "console;verbosity=detailed"
+
deploy:
needs: build-ubuntu
runs-on: ubuntu-latest
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index d373e4b5b9..118bdefe3f 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -1,44 +1,67 @@
name: .NET CI
on:
- push:
- paths-ignore:
- - '**.md'
- - '.github/**'
pull_request:
branches: [ master, main ]
paths-ignore:
- '**.md'
- - '.github/**'
jobs:
build:
-
+ name: Build and test Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - name: Setup .NET 6.0
- uses: actions/setup-dotnet@v1
+
+ # Building requires an up-to-date .NET SDK.
+ - name: Setup dotnet
+ uses: actions/setup-dotnet@v3
with:
- dotnet-version: 6.0.x
+ dotnet-version: |
+ 6.0.x
+ 7.0.x
+
+ # Restore and build
- name: Restore dependencies
- run: dotnet restore
+ run: dotnet restore
- name: Build Nuget Versions
- run: dotnet build ./tools/Explicit.NuGet.Versions/Explicit.NuGet.Versions.sln
+ run: dotnet build ./tools/Explicit.NuGet.Versions/Explicit.NuGet.Versions.sln
- name: Build Release
run: dotnet build Castle.Windsor.sln -c Release
- - name: Castle.Windsor.Tests
- run: dotnet test src/Castle.Windsor.Tests
- - name: Castle.Windsor.Extensions.DependencyInjection.Tests
- run: dotnet test src/Castle.Windsor.Extensions.DependencyInjection.Tests
- - name: Castle.Facilities.AspNetCore.Tests
- run: dotnet test src/Castle.Facilities.AspNetCore.Tests
- - name: Castle.Facilities.AspNet.SystemWeb.Tests
- run: dotnet test src/Castle.Facilities.AspNet.SystemWeb.Tests
- - name: Castle.Facilities.AspNet.Mvc.Tests
- run: dotnet test src/Castle.Facilities.AspNet.Mvc.Tests
- - name: Castle.Facilities.AspNet.WebApi.Tests
- run: dotnet test src/Castle.Facilities.AspNet.WebApi.Tests
- - name: Castle.Facilities.WcfIntegration.Tests
- run: dotnet test src/Castle.Facilities.WcfIntegration.Tests
+
+ # Run tests for linux
+ - name: Test on .NET 6.0
+ run: |
+ dotnet test src/Castle.Windsor.Tests -c Release -f net6.0 --no-build --no-restore -l "console;verbosity=detailed"
+ dotnet test src/Castle.Windsor.Extensions.DependencyInjection.Tests -c Release -f net6.0 --no-build --no-restore -l "console;verbosity=detailed"
+
+ test-windows:
+ name: Build and test on Windows
+ runs-on: windows-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ # Building requires an up-to-date .NET SDK.
+ - name: Setup dotnet
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: |
+ 6.0.x
+ 7.0.x
+
+ # Restore and build
+ - name: Restore dependencies
+ run: dotnet restore
+ - name: Build Release
+ run: dotnet build Castle.Windsor.sln -c Release
+
+ # Run tests on windows
+ - name: Test on .NET Framework 4.6.2 (Windows only)
+ run: |
+ dotnet test src/Castle.Windsor.Tests -c Release -f net462 --no-build --no-restore -l "console;verbosity=detailed"
+ dotnet test src/Castle.Facilities.AspNet.Mvc.Tests -c Release -f net462 --no-build --no-restore -l "console;verbosity=detailed"
+ dotnet test src/Castle.Facilities.AspNet.SystemWeb.Tests -c Release -f net462 --no-build --no-restore -l "console;verbosity=detailed"
+ dotnet test src/Castle.Facilities.AspNet.WebApi.Tests -c Release -f net462 --no-build --no-restore -l "console;verbosity=detailed"
+ dotnet test src/Castle.Facilities.WcfIntegration.Tests -c Release -f net462 --no-build --no-restore -l "console;verbosity=detailed"
diff --git a/Castle.Windsor.sln b/Castle.Windsor.sln
index b2e7f6ee36..f5c2203e36 100644
--- a/Castle.Windsor.sln
+++ b/Castle.Windsor.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30711.63
+# Visual Studio Version 17
+VisualStudioVersion = 17.7.33913.275
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Castle.Windsor", "src\Castle.Windsor\Castle.Windsor.csproj", "{5F6A631E-8EB1-4BC1-826D-86D3059945B8}"
EndProject
@@ -23,6 +23,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Castle Build", "Castle Buil
build.cmd = build.cmd
CHANGELOG.md = CHANGELOG.md
CONTRIBUTING.md = CONTRIBUTING.md
+ .github\workflows\dotnet-release.yml = .github\workflows\dotnet-release.yml
+ .github\workflows\dotnet.yml = .github\workflows\dotnet.yml
LICENSE = LICENSE
README.md = README.md
EndProjectSection
diff --git a/src/Castle.Facilities.AspNet.Mvc.Tests/Castle.Facilities.AspNet.Mvc.Tests.csproj b/src/Castle.Facilities.AspNet.Mvc.Tests/Castle.Facilities.AspNet.Mvc.Tests.csproj
index ccb0686472..55ee79c2e6 100644
--- a/src/Castle.Facilities.AspNet.Mvc.Tests/Castle.Facilities.AspNet.Mvc.Tests.csproj
+++ b/src/Castle.Facilities.AspNet.Mvc.Tests/Castle.Facilities.AspNet.Mvc.Tests.csproj
@@ -19,7 +19,7 @@
-
+
diff --git a/src/Castle.Facilities.AspNet.SystemWeb.Tests/Castle.Facilities.AspNet.SystemWeb.Tests.csproj b/src/Castle.Facilities.AspNet.SystemWeb.Tests/Castle.Facilities.AspNet.SystemWeb.Tests.csproj
index 76f9f3266d..9b287d5a60 100644
--- a/src/Castle.Facilities.AspNet.SystemWeb.Tests/Castle.Facilities.AspNet.SystemWeb.Tests.csproj
+++ b/src/Castle.Facilities.AspNet.SystemWeb.Tests/Castle.Facilities.AspNet.SystemWeb.Tests.csproj
@@ -22,7 +22,7 @@
-
+
diff --git a/src/Castle.Facilities.AspNet.WebApi.Tests/Castle.Facilities.AspNet.WebApi.Tests.csproj b/src/Castle.Facilities.AspNet.WebApi.Tests/Castle.Facilities.AspNet.WebApi.Tests.csproj
index af37968903..5c4bb1721d 100644
--- a/src/Castle.Facilities.AspNet.WebApi.Tests/Castle.Facilities.AspNet.WebApi.Tests.csproj
+++ b/src/Castle.Facilities.AspNet.WebApi.Tests/Castle.Facilities.AspNet.WebApi.Tests.csproj
@@ -19,7 +19,7 @@
-
+
diff --git a/src/Castle.Facilities.AspNetCore.Tests/Castle.Facilities.AspNetCore.Tests.csproj b/src/Castle.Facilities.AspNetCore.Tests/Castle.Facilities.AspNetCore.Tests.csproj
index 4efbaf31da..a8077e09a4 100644
--- a/src/Castle.Facilities.AspNetCore.Tests/Castle.Facilities.AspNetCore.Tests.csproj
+++ b/src/Castle.Facilities.AspNetCore.Tests/Castle.Facilities.AspNetCore.Tests.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/src/Castle.Facilities.AspNetCore/Castle.Facilities.AspNetCore.csproj b/src/Castle.Facilities.AspNetCore/Castle.Facilities.AspNetCore.csproj
index 69d652dbda..d9e239c4ef 100644
--- a/src/Castle.Facilities.AspNetCore/Castle.Facilities.AspNetCore.csproj
+++ b/src/Castle.Facilities.AspNetCore/Castle.Facilities.AspNetCore.csproj
@@ -1,4 +1,4 @@
-
+
netstandard2.0
@@ -18,12 +18,12 @@
Castle.Facilities.AspNetCore
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/Castle.Facilities.WcfIntegration.Tests/Castle.Facilities.WcfIntegration.Tests.csproj b/src/Castle.Facilities.WcfIntegration.Tests/Castle.Facilities.WcfIntegration.Tests.csproj
index 11b5401dc0..74829b457c 100644
--- a/src/Castle.Facilities.WcfIntegration.Tests/Castle.Facilities.WcfIntegration.Tests.csproj
+++ b/src/Castle.Facilities.WcfIntegration.Tests/Castle.Facilities.WcfIntegration.Tests.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj b/src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj
index 474f70187f..e508112e88 100644
--- a/src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj
+++ b/src/Castle.Windsor.Tests/Castle.Windsor.Tests.csproj
@@ -1,7 +1,7 @@
- net462;netcoreapp3.1;net6.0
+ net462;netcoreapp3.1;net6.0
@@ -47,7 +47,8 @@
-
+
+
@@ -67,8 +68,8 @@
-
-
+
+
$(DefineConstants);FEATURE_THREADABORT;FEATURE_WPF;FEATURE_CONSOLETRACELISTENER
diff --git a/src/Castle.Windsor.Tests/Config/ConfigurationTestCase.cs b/src/Castle.Windsor.Tests/Config/ConfigurationTestCase.cs
index e8a6858775..83b613b5c7 100644
--- a/src/Castle.Windsor.Tests/Config/ConfigurationTestCase.cs
+++ b/src/Castle.Windsor.Tests/Config/ConfigurationTestCase.cs
@@ -15,7 +15,7 @@
namespace Castle.MicroKernel.Tests.Configuration
{
using System.Collections.Generic;
-
+ using System.IO;
using Castle.Core;
using Castle.Core.Configuration;
using Castle.Core.Resource;
@@ -218,7 +218,8 @@ public void ShouldNotThrowCircularDependencyException()
[Test]
public void Can_properly_populate_array_dependency_from_xml_config_when_registering_by_convention()
{
- Container.Install(Configuration.FromXmlFile("config\\ComponentWithArrayDependency.config"))
+ var path = Path.Combine("Config", "ComponentWithArrayDependency.config");
+ Container.Install(Configuration.FromXmlFile(path))
.Register(Component.For().ImplementedBy().Named("componentWithArrayDependency"));
Container.Register(
Classes.FromAssembly(GetCurrentAssembly()).Pick().WithServiceFirstInterface());
diff --git a/src/Castle.Windsor.Tests/LoggingFacility/BaseTest.cs b/src/Castle.Windsor.Tests/LoggingFacility/BaseTest.cs
index 0fb1a91578..12616e4471 100644
--- a/src/Castle.Windsor.Tests/LoggingFacility/BaseTest.cs
+++ b/src/Castle.Windsor.Tests/LoggingFacility/BaseTest.cs
@@ -19,6 +19,7 @@ namespace Castle.Facilities.Logging.Tests
using Castle.Services.Logging.Log4netIntegration;
using Castle.Services.Logging.NLogIntegration;
using Castle.Windsor;
+ using System.IO;
///
/// Summary description for BaseTest.
@@ -42,12 +43,12 @@ protected string GetConfigFile()
if (typeof(TLoggerFactory) == typeof(Log4netFactory) ||
typeof(TLoggerFactory) == typeof(ExtendedLog4netFactory))
{
- return "LoggingFacility\\log4net.facilities.test.config";
+ return Path.Combine("LoggingFacility", "log4net.facilities.test.config");
}
if (typeof(TLoggerFactory) == typeof(NLogFactory) ||
typeof(TLoggerFactory) == typeof(ExtendedNLogFactory))
{
- return "LoggingFacility\\NLog.facilities.test.config";
+ return Path.Combine("LoggingFacility", "NLog.facilities.test.config");
}
return string.Empty;
}