Skip to content

Update System.IO.Abstraction to version >= 18.0.0 #1136

@anhaehne

Description

@anhaehne

Describe the bug
After 18.0.0 all types of System.IO.Abstraction were moved to the package Testable.System.IO.Abstractions which breaks all dependencies on prior versions.
To be able to update System.IO.Abstraction in my project to a version >= 18.0.0 this package has update first.

It is recommended to switch to the packages Testable.System.IO.Abstraction and Testable.System.IO.Abstraction.Wrappers.

Since this is a library issue not related to kubernetes, i will leave out the rest of the template.

For all having the same issue there exists a workaround by creating an aliased package reference:

csproj:

<ItemGroup>
   <PackageReference Include="System.IO.Abstractions" Version="17.2.3">
       <Aliases>LegacySystemIOAbstractions</Aliases>
   </PackageReference>
</ItemGroup>

startup.cs:

extern alias LegacySystemIOAbstractions;
using System.IO.Abstractions;

public class Startup : RESTworld.AspNetCore.StartupBase
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddScoped<IFileSystem, FileSystem>();
        services.AddScoped<LegacySystemIOAbstractions.System.IO.Abstractions.IFileSystem, LegacySystemIOAbstractions.System.IO.Abstractions.FileSystem>();
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions