Skip to content

Commit

Permalink
Merge pull request #71 from unitycontainer/release/5.11
Browse files Browse the repository at this point in the history
Release/5.11
  • Loading branch information
ENikS authored Dec 12, 2019
2 parents 5cf79bc + ef0d013 commit 7c23b47
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: Visual Studio 2019 Preview
image: Visual Studio 2019
configuration: Release
platform: Any CPU

Expand Down
2 changes: 1 addition & 1 deletion package.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<Version>5.11.4</Version>
<Version>5.11.5</Version>
<PackageReleaseNotes>This release is compatible with Core 3.1</PackageReleaseNotes>
</PropertyGroup>

Expand Down
11 changes: 6 additions & 5 deletions src/Extensions/HostingExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ public static IHostBuilder UseUnityServiceProvider(this IHostBuilder hostBuilder
{
_factory = new ServiceProviderFactory(container);

return hostBuilder.ConfigureServices((context, services) =>
{
services.Replace(ServiceDescriptor.Singleton<IServiceProviderFactory<IUnityContainer>>(_factory));
services.Replace(ServiceDescriptor.Singleton<IServiceProviderFactory<IServiceCollection>>(_factory));
});
return hostBuilder.UseServiceProviderFactory<IUnityContainer>(_factory)
.ConfigureServices((context, services) =>
{
services.Replace(ServiceDescriptor.Singleton<IServiceProviderFactory<IUnityContainer>>(_factory));
services.Replace(ServiceDescriptor.Singleton<IServiceProviderFactory<IServiceCollection>>(_factory));
});
}

public static IWebHostBuilder UseUnityServiceProvider(this IWebHostBuilder hostBuilder, IUnityContainer container = null)
Expand Down
2 changes: 1 addition & 1 deletion src/Unity.Microsoft.DependencyInjection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Full</DebugType>
</PropertyGroup>

Expand Down

0 comments on commit 7c23b47

Please sign in to comment.