# working document of porting Ucommerce to .NET Core ## Alternative solutions * Ucommerce headless with API integrations for the individual CMSes ? 😍 ## Working branch of the project can be found at: **ucommerce-dot-net-core** ### Projects excluded from solution Projects with direct dependencies on Webforms should be removed from the core. This includes the web project with controllers. #### Removed * UcommerceWeb * Ucommerce.Web.Shell #### Left alone projects for being able to compile (for now) A lot of projects has dependencies on PResentation (JAvascriptFactory and Widgets). This is left here for being able to compile for now. * Ucommerce.Presentation Every project with a dependency here should have it removed via abstractions made in Ucommerce (unless Ucommerce.Presentation dies all along when the new UI stack is complete, which i recommend and strongly believe is the right thing to do.) ## 4.7.2 (s/m) All projects must target 4.7.2 for the easiest portability. - Issue with TT template not generating properly after upgrading to 4.7.2 - Issue with icons.resx after upgrading to 4.7.2 - icons.resx excluded for now ## package references (s) In order to swap to .net core all packages.config must be converted to package references. packages.config not supported going forward. - [x] Ucommerce - [ ] Newtonsoft.json has install.ps1 not run when installing - [x] Ucommerce.Installer - Contains no dependencies and such no packages.config needed to be converted - [x] Ucommerce.Infrastructure - [ ] the rest 😎 ## Multi platform support (.net and .net core) How do we ensure Ucommerce is accessible across platforms? .net standard might be the solution Good article around the problem that speaks in favor of .net standard: https://www.ben-morris.com/sharing-libraries-between-net-core-and-net-framework-applications/ ### What .net standard version do we choose ? With the information already known, is this even possible? Umbraco seems to target .net core 3.1 https://umbraco.com/blog/net-core-alpha-release/ My best guess is .net standard 2.0 based on this article here: https://docs.microsoft.com/en-us/dotnet/standard/net-standard ### Portability analyzer To get a good idea on the workload needed, we can use this tool: https://www.michaeltaylorp3.net/porting-a-net-framework-library-to-net-standard/ (we propably need an abstration for system.web. There's an old branch with some ideas hidden in the source code). ### POC target .net standard? Maybe build a class library targeting .net standard and include it in Umbraco installation to see it working?? ## New solution architecture * What should target .net 4.5, what should target .net standard and what should target .net core? * Draw a diagram showing a conceptual solution. ## Dependencies compatibility chart Let's build a dependency compatibility chart for now that shows our dependencies and their ability to run on .net standard / core? **List taken from ucommerce.nupkg might not be complete** x = support ? = unknown % = not supported | Dependency | .NET 4.5 | .NET standard 2.0 | | ---------------------------------- | -------- | ----------------- | | Newtonsoft.Json | X | - | | AuthorizeNet | X | - | | Braintree | X | - | | Castle.Core | X | - | | Castle.Facilities.AspNet.SystemWeb | X | - | | Castle.Windsor | X | - | | ClientDependency | X | - | | Dapper | X | - | | EPPlus | X | - | | FluentNHibernate | X | - | | FluentValidation | X | - | | Microsoft.AspNet.WebApi.Core | X | - | | Microsoft.AspNet.WebApi.WebHost | X | - | | Newtonsoft.Json | X | - | | NHibernat | X | - | | NHibernate.Caches.SysCache | X | - | | Slugify.Core | X | - | | System.Linq.Dynamic | X | - | ## Chore ### Deploy.To.Package / psake Deploy.To.Package needs to be extended with a new package process to compile and build for .NET core and .net 4.5 Or this should be re-written in a new maybe more modern way. ## Installer project for each new implementation on .NET core (Umbraco first, then SF, then SC?) ### Umbraco Maybe time to let the old package die and only have NuGet? How's the package situation in Umbraco going forward? ### Sitefinity ? ### Sitecore ?