Closed GeeWee closed 4 years ago
Issue-Label Bot is automatically applying the label type: enhancement
to this issue, with a confidence of 0.91. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
This would require us to introduce a new dependency https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection.Abstractions which is not supported on .NET Framework (which we are targeting here). Also ASP.NET Core has it's own file system abstractions which I think should be prefered to "raw" I/O.
I'm therefore closing this, but anyway thanks a lot for your suggestion!
Perfectly fair. Thanks for considering it!
Let's create conditional package reference
<ItemGroup Condition="'$(TargetFramework)' != 'net461'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>
Is your feature request related to a problem? Please describe. When using the built in ASP.NET core dependency injection, I often have to write code like this:
Describe the solution you'd like It would be nice if
System.IO.Abstractions
defined an extension method onIServiceCollection
likeAddPhysicalFileSystem
which made sure to register all the necessary dependencies in the DI container.