Unravel your dependence on System.Web
.
Unravel's goal is to facilitate in-place upgrade from ASP.NET MVC and Web API on .NET Framework to ASP.NET Core 2.1 (the last version supported on .NET Framework). Long-lived upgrade branches are bad.
The ultimate goal is that an upgrade to ASP.NET Core could be reduced to roughly:
- Remove
Global.asax
,Web.config
, and other lingering ASP.NET artifacts - Remove
<ProjectTypeGuids>
from.csproj
- Migrate
.csproj
to SDK format with Project2015To2017.Migrate2019.Tool - Convert remaining references to OWIN
IAppBuilder
toUseOwin()
- Update
Startup.cs
to inherit fromMicrosoft.AspNetCore.Hosting.StartupBase
, or to a convention-basedStartup
- Convert project to .NET Core Console Application with standard ASP.NET Core
Program.cs
We'll see how close we can get…
- Set up Unravel.Startup
- Make sure everything still works!
- Configure additional packages based on which parts of ASP.NET are in use.
- Implement
ConfigureServices()
with additional services and configuration. - Begin migration to dependency injection, modern configuration, modern logging, etc.
- Open issues with your pain points.
- Begin migration from ASP.NET to ASP.NET Core.
- Open more issues with your pain points.
Unravel provides granular packages to avoid extra dependencies.
- Unravel.Startup provides a fully configurable ASP.NET Core
IWebHost
on top ofSystem.Web
via OWIN, with forward-compatible dependency injection, configuration and logging. - Unravel.AspNet.Mvc provides an
AddAspNetMvc()
extension method onIServiceCollection
that registers aSystem.Web.Mvc.IDependencyResolver
and allows additional configuration. - Unravel.AspNet.WebApi provides an
AddAspNetWebApi()
extension method onIServiceCollection
that registers aSystem.Web.Http.Dependencies.IDependencyResolver
and allows additional configuration.
Microsoft.AspNet.Identity has its own approach to dependency injection which needs to be adapted to work with IServiceCollection
.
- Unravel.AspNet.Identity provides
AddIdentity()
extension methods onIServiceCollection
that allow additional configuration. - Unravel.AspNet.Identity.EntityFramework allows configuring Microsoft.AspNet.Identity.EntityFramework.
Unravel will try to enable as much of ASP.NET Core as possible. (Experimental!)
- Unravel.AspNetCore.Mvc provides
IgnoreControllersOfType<T>()
extension methods to prevent ASP.NET Core from trying to invoke legacy ASP.NET controllers. - Unravel.AspNetCore.Mvc.ViewFeatures provides
AddAspNetMvcViewEngines()
to compile ASP.NET Core views with the ASP.NET compiler.
Startup
concept from Arex388.AspNet.Mvc.Startup- David Fowler's Gist
- Scott Dorman's Blog
- The StackOverflow question that lead @arex388 to David and Scott.