diff --git a/README.md b/README.md
index 9b772b3..1d5bd3f 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
Multitenant application support for [Autofac IoC](https://github.com/autofac/Autofac).
-[![Build status](https://ci.appveyor.com/api/projects/status/9120t73i97ywdoav?svg=true)](https://ci.appveyor.com/project/Autofac/autofac-multitenant) [![codecov](https://codecov.io/gh/Autofac/Autofac.Multitenant/branch/develop/graph/badge.svg)](https://codecov.io/gh/Autofac/Autofac.Multitenant)
+[![Build status](https://ci.appveyor.com/api/projects/status/9120t73i97ywdoav?svg=true)](https://ci.appveyor.com/project/Autofac/autofac-multitenant) [![codecov](https://codecov.io/gh/Autofac/Autofac.Multitenant/branch/develop/graph/badge.svg)](https://codecov.io/gh/Autofac/Autofac.Multitenant) [![Open in Visual Studio Code](https://open.vscode.dev/badges/open-in-vscode.svg)](https://open.vscode.dev/autofac/Autofac.Multitenant)
Please file issues and pull requests for this package in this repository rather than in the Autofac core repo.
diff --git a/appveyor.yml b/appveyor.yml
index f0e95bd..ee2ab4b 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,9 +1,9 @@
image: Ubuntu
-version: '6.0.0.{build}'
+version: '7.0.0.{build}'
dotnet_csproj:
- version_prefix: '6.0.0'
+ version_prefix: '7.0.0'
patch: true
file: 'src\**\*.csproj'
@@ -33,7 +33,7 @@ deploy:
- provider: NuGet
server: https://www.myget.org/F/autofac/api/v2/package
api_key:
- secure: rCUEY75fXN0wxtMy6QL4jCrLdaYbxIBzIXWeN+wEu/XDpyqimzreOc5AH5jMd5ah
+ secure: xUXExgVAagrdEicCjSxsQVrwiLo2TtnfqMbYB9Cauq2cpbm/EVz957PBK0v/GEYq
skip_symbols: true
symbol_server: https://www.myget.org/F/autofac/symbols/api/v2/package
artifact: MyGet
diff --git a/global.json b/global.json
index b4c7a8c..e6e67e4 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "3.1.402",
+ "version": "7.0.101",
"rollForward": "latestFeature"
}
}
diff --git a/src/Autofac.Multitenant/Autofac.Multitenant.csproj b/src/Autofac.Multitenant/Autofac.Multitenant.csproj
index 0aaa2a9..17db308 100644
--- a/src/Autofac.Multitenant/Autofac.Multitenant.csproj
+++ b/src/Autofac.Multitenant/Autofac.Multitenant.csproj
@@ -4,7 +4,7 @@
Autofac extension for multitenant application support.
0.0.1
- netstandard2.0;netstandard2.1;
+ net7.0;net6.0;netstandard2.0;netstandard2.1
true
true
Autofac.Multitenant
@@ -41,7 +41,7 @@
-
+
All
diff --git a/src/Autofac.Multitenant/MultitenantContainer.cs b/src/Autofac.Multitenant/MultitenantContainer.cs
index 7cc5a0a..db1cede 100644
--- a/src/Autofac.Multitenant/MultitenantContainer.cs
+++ b/src/Autofac.Multitenant/MultitenantContainer.cs
@@ -28,6 +28,9 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
+#if NET5_0_OR_GREATER
+using System.Runtime.Loader;
+#endif
using System.Threading.Tasks;
using Autofac.Core;
using Autofac.Core.Lifetime;
@@ -299,6 +302,20 @@ public ILifetimeScope BeginLifetimeScope(object tag, Action co
return this.GetCurrentTenantScope().BeginLifetimeScope(tag, configurationAction);
}
+#if NET5_0_OR_GREATER
+ ///
+ public ILifetimeScope BeginLoadContextLifetimeScope(AssemblyLoadContext loadContext, Action configurationAction)
+ {
+ return this.GetCurrentTenantScope().BeginLoadContextLifetimeScope(loadContext, configurationAction);
+ }
+
+ ///
+ public ILifetimeScope BeginLoadContextLifetimeScope(object tag, AssemblyLoadContext loadContext, Action configurationAction)
+ {
+ return this.GetCurrentTenantScope().BeginLoadContextLifetimeScope(tag, loadContext, configurationAction);
+ }
+#endif
+
///
/// Allows configuration of tenant-specific components. You may only call this
/// method if the tenant is not currently configured.
diff --git a/test/Autofac.Multitenant.AspNetCore.Test/Autofac.Multitenant.AspNetCore.Test.csproj b/test/Autofac.Multitenant.AspNetCore.Test/Autofac.Multitenant.AspNetCore.Test.csproj
index f1ecd76..7ba0baf 100644
--- a/test/Autofac.Multitenant.AspNetCore.Test/Autofac.Multitenant.AspNetCore.Test.csproj
+++ b/test/Autofac.Multitenant.AspNetCore.Test/Autofac.Multitenant.AspNetCore.Test.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ net7.0
$(NoWarn);CS1591;SA1602;SA1611
true
Autofac.Multitenant.AspNetCore.Test
@@ -22,12 +22,12 @@
-
+
All
-
+
diff --git a/test/Autofac.Multitenant.Test/Autofac.Multitenant.Test.csproj b/test/Autofac.Multitenant.Test/Autofac.Multitenant.Test.csproj
index ba3b835..689c452 100644
--- a/test/Autofac.Multitenant.Test/Autofac.Multitenant.Test.csproj
+++ b/test/Autofac.Multitenant.Test/Autofac.Multitenant.Test.csproj
@@ -1,7 +1,7 @@
- netcoreapp3.1
+ net7.0
$(NoWarn);CS1591;SA1602;SA1611
true
Autofac.Multitenant.Test