I need to have access to IFormFile interface in ASP.Net Core 1.
Could you please tell me which NuGet package I should install?
Even though the original question is about ASP.NET Core 1, I landed here while searching for a way to reference IFormFile in a library targeting .NET 6 (should work for ASP.NET Core 3.0+). For those who are also looking for an up-to-date solution, you can add a FrameworkReference to your .csproj file like this:
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
This will allow you to use IFormFile and other ASP.NET Core types in your library.
References:
ASP.NET Core Fundamentals: Targeting ASP.NET Core
GitHub Issue: Reference to IFormFile in .NET 6
I hope this helps anyone who is working with a more recent version of .NET!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With