0

What is the difference between System.Web.Mvc's FileStreamResult and Microsoft.AspNetCore.Mvc's FileStreamResult? Is there any significant take away of using the latter over the first one?

Edit:

Is it possible to have .Net Core project but still use System.Web.Mvc? I don't know how but just asking for possibility here, is it or is not?

CodeRed
  • 905
  • 1
  • 6
  • 24

2 Answers2

0

System.Web.Mvc namespace is used by the .NET Framework MVC. Microsoft.AspNetCore.Mvc is used by .NET Core MVC. Pick appropriatly for the type of project you are building.

Nick Goloborodko
  • 2,883
  • 3
  • 21
  • 38
0

The System.Web.Mvc namespace is used the .NET Framework. If your project is targetting the .NET Framework, use this.

The Microsoft.AspNetCore.Mvc namespace is used in .NET Core. If your project is targetting .NET Core, use this.

Only one of them will be available to you, depending on your project.

You can have an ASP.NET Core project that targets the full .NET Framework, and then add a reference to System.Web.Mvc.dll directly. That might work. But I don't know why you would want to.

But if your ASP.NET Core project is targetting .NET Core, then there is no way to use System.Web.Mvc.

Gabriel Luci
  • 38,328
  • 4
  • 55
  • 84