How can you use .NET framework class libraries in a .NET Core application?
  • Class libraries which are built against .NET framework can be referenced and used inside a .NET Core application starting from .NET Core 2.x by means of a Compatibility Shim that was included in the .NET Core 2.x
  • .NET Framework and .NET Core are based on different BCL (base class libraries). The code can be reused, but if the class libraries make use of any .NET Framework BCL specific references (such as Object types - which are different in .NET Core), the application might throw runtime exceptions.

ASP.NET Core •  Added 7 days ago

What is the difference between a Middleware and a HttpModule?

* A HttpModule is core to the ASP.NET MVC framework, while a Middleware is native to the ASP.NET Core * Both Middleware and HttpModule are pieces of ...


What is the difference between Run() and Use() methods in IApplicationBuilder?

* Use() method: Used to create a simple middleware which can be "chained" to other functions over the pipeline. Takes two arguments: RequestDelegate ...


What is the difference between Response.Redirect() and Server.Transfer() ?

* Response.Redirect() redirects browser to another page, history is updated, trip back to client where browser loads the new page. * Server.Transfer( ...


How do you handle errors Globally in ASP.NET Core?

We can make use of the built-in UseExceptionHandler() middleware for catching Global Errors in ASP.NET Core. ``` app.UseExceptionHandler(err => ...


How do you design a strongly-typed class for a configuration?

To create a strongly-typed class for binding to a configuration section: * The property names and their types match the key names and their value t ...


We use cookies to provide you with a great user experience, analyze traffic and serve targeted promotions.   Learn More   Accept