Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Support for Microsoft.Extensions.DependencyInjection 6.0.0 #238

Merged
merged 5 commits into from Oct 4, 2022

Conversation

danielmarbach
Copy link
Contributor

@danielmarbach danielmarbach commented Oct 4, 2022

Originally reported by @SimonCropp

This brings in support for Microsoft.Extensions.DependencyInjection 6.0.0. ServiceCollection has been moved into the abstractions at some point. When trying to use NServiceBus.Extensions.DependencyInjection with Microsoft.Extensions.DependencyInjection 6.0.0

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <OutputType>Exe</OutputType>
    <LangVersion>7.3</LangVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="NServiceBus" Version="7.8.0" />
    <PackageReference Include="NServiceBus.Extensions.DependencyInjection" Version="1.0.1" />
    <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
  </ItemGroup>
</Project>

the following error occurs

  Program.cs(4, 20): [CS0433] The type 'ServiceCollection' exists in both 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' and 'Microsoft.Extensions.DependencyInjection, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

@danielmarbach danielmarbach changed the base branch from release-1.0 to release-1.1 October 4, 2022 08:01
@danielmarbach danielmarbach merged commit 1510b1b into release-1.1 Oct 4, 2022
@danielmarbach danielmarbach deleted the update-ms-di branch October 4, 2022 08:01
@danielmarbach danielmarbach added this to the 1.1.0 milestone Oct 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants