Nopcommerce: Upgrade to .NET Core

Created on 15 Aug 2017  Â·  35Comments  Â·  Source: nopSolutions/nopCommerce

Right now we use ASP.NET Core 2 (based on .NET Framework 4.6.1). We don't use .NET Core now just because EF Core doesn't support lazy loading, etc. So we wait for EF Core team to implement it (on its roadmap for the next version)

also see https://www.nopcommerce.com/boards/t/48993/targetting-net-core-2-aka-net-core-2-running-on-net-core-2.aspx

Contribution: https://github.com/nopSolutions/nopCommerce/pull/2636

enterprise / highlight feature

Most helpful comment

.net core 2.1 & entity framework core 2.1 released

All 35 comments

Would be great to see ... with this done the app would be able to target netcoreapp20 ? I'm thinking being able to run on linux would be awesome - it would open up more hosting options (could be cheaper ?!).

we're already on asp.net core but it just targets .net framework 4.6.1

Thanks Andrei, so this would involve:

  • Switch to entity framework core.
  • Switch to identity core
  • All packages would have to target .net core (sticking point maybe)
  • Fix any other framework api issues (calls outside of .net standard - maybe there are none)

@sc0ttc0 sure. please see the work item description regarding EF Core

@AndreiMaz thanks, the lazy loading issues, on EF Core - does that scupper the wholesale move to .net core, or is it something that will still be progressed ? I also see that features such as grouping are missing in EF core 2.0 ... will it have to wait for 2.1 ?

@sc0ttc0 we (our team) cannot (and should not) implement them. we just wait for EF team

@AndreiMaz thanks - wasn't suggest that you guys implement that the EF features :-). So basically waiting on EF core 2.1

@sc0ttc0 sure. got it =))) you're absolutely right. just waiting

Hi NopCommerce Team,

Is nop team planning on updating the target to any other version or it will start in .net 4.6.1 in 4.0 production?

I have downloaded latest beta version from github when I tried to create a core plugin that targeting to asp.net core 1.1 then I get errors related to nuget.
so my question is -

How the project is targeting .net 4.6.1 when project is in core?

If I want to create a test Plugin in 4.0. I should use target .net 4.6.1? how can I write code in core with Target 4.6.1? I thought core requires core 1.1 target?

"core" apps - ie using the asp .net core framework or EF core can still run on the full framework or even a .net core console app could target the full framework if you want (so long as you stick to .net standard)

So using the ASP .Net Core framework is OK and you can still target 4.6.1.

Given the limitation with the EF noted above I would assume that NOP 4.0 is going to release targeting .net 4.6.1 (or similar) would be good to have that confirmed though.

@sc0ttc0 absolute;y right. we just wait for EF Core team to support navigation properties

So to confirm NOP 4.0 will be released targeting .net 4.6.1

@sc0ttc0 yes

The schedule for EF Core is in-sync with the .NET Core and ASP.NET Core schedule
https://github.com/aspnet/Home/wiki/Roadmap

ASP.NET Core 2.1 Release Q1-Q2 2018

i think EF Core 2.1 Release will be Q1-Q2 2018

when will be Nopcommerce 4.1 release???

@tigran-avdalyan great! our average release cycle in about 6 months. So it'll also be Q1-Q2 2018

@tigran-avdalyan @sc0ttc0 If you want to play around with a fully net core 2 version I have a work in progress at https://github.com/ChrisJollyAU/nopCommerce/tree/target-net-core-2 . Make sure you are on branch "target-net-core-2". Most functions are already working

Is there a timeframe on this?

its marked for the 4.10 milestone so should be integrated with the next release

Happened to notice that EF 2.1 preview is out with lazy loading/navigation included - yay!

https://blogs.msdn.microsoft.com/dotnet/2018/02/27/announcing-entity-framework-core-2-1-preview-1/

Appreciate there is more than just this to move to true cross-platform nop but getting there :-)

@sc0ttc0 Will try to update my branch to 2.1 preview1 over the weekend. I do see that there is still no implicit many-to-many relationship support. While it can be done explicitly (and that is what I have in my branch) it makes things easier if implicit support is there.

While I believe I already have .Include() for the requests have the lazy loading just means I don't worry about missing anything

@tigran-avdalyan my branch updated to preview 2. Unfortunately there is a bug in EF core https://github.com/aspnet/EntityFrameworkCore/issues/11689 that stops it from even being able to do a basic install. It is fixed for their next release though

.net core 2.1 & entity framework core 2.1 released

mostly done

How far away are we from being able to run this on mac? For now it seems to be a problem since ClearPluginAssemblies is running with 461 framework.

I'd also like to see this (more for linux ). I guess we are saying that Nop should target Net Standard .. guess this should be a separate issue ?

ClearPluginAssemblies is a compile time task if I remember correctly. Once published there is no hint of that project. Since they have recently updated to target .net core 2.1 the current develop branch should run. Only thing I can think of offhand that may not work is some file paths. Having windows style paths on a unix system don't always work

Hello! I did try with the develop branch, but got an error when running dotnet run. Dotnet restore worked.

Sindre Markussen
Systemutvikler
H-K reklamebyrå


From: Christopher Jolly notifications@github.com
Sent: Monday, June 4, 2018 3:18:54 PM
To: nopSolutions/nopCommerce
Cc: lintho; Comment
Subject: Re: [nopSolutions/nopCommerce] Upgrade to .NET Core (#2492)

ClearPluginAssemblies is a compile time task if I remember correctly. Once published there is no hint of that project. Since they have recently updated to target .net core 2.1 the current develop branch should run. Only thing I can think of offhand that may not work is some file paths. Having windows style paths on a unix system don't always work

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/nopSolutions/nopCommerce/issues/2492#issuecomment-394351187, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGjGkbKrKhhLGsUtKr8BsJzlMhaWuYvyks5t5TO-gaJpZM4O3fUj.

What kind of performance improvements are we seeing when targeting netcore 2.1?
Startup? Page load?

Anyone?

Not sure how valid a questions that is. ASP .Net Core was implemented with nop 4.0 - this changed the web stack and it should perform better but was still targeting the .net full framework. With 4.1 I notice that sql server Fetch / Next has been used - presumably improving performance on category pages with large product sets. So comparing 4.0 (full) with 4.1 (core) would be apples and pears.

You could try re-target 4.1 to run on full framework and compare performance, but as it now targets netcoreapp2.1 thats probably more effort than I have time for. netcore has loads of api level performance improvements .. but how the figures in nop is going to vary a lot depending on config and data. I would guess/hope it would make a difference.

Not the answer you were looking for I suspect ... maybe someone will do a A/B comparison at some point.. I'd be interested to know as well.

And not sure if it helps ... but this suggests massive improvement through ASP .Net Core

How is the performance in the latest nopcommerce netcore? I read that the performance was worse in some cases. I am hesitant to upgrade past nop 4.00 which is compiled for net461 unless there are definite performance improvements.

Can anyone comment if there are definite improvements?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndreiMaz picture AndreiMaz  Â·  3Comments

mrnams picture mrnams  Â·  3Comments

mariannk picture mariannk  Â·  5Comments

JohnsonJohnsonYuan picture JohnsonJohnsonYuan  Â·  5Comments

AndreiMaz picture AndreiMaz  Â·  7Comments