Nopcommerce: Upgrade to ASP.NET Core 2.1

Created on 27 Apr 2018  路  5Comments  路  Source: nopSolutions/nopCommerce

This is just enhancement,
As nopCommerce is waiting for Entity framework core 2.1 to support Lazy loading feature,

Same time upgrade nopCommerce to Asp.Net Core 2.1 and also target all project to .netcore2.1 instead of 4.6.1.

https://blogs.msdn.microsoft.com/webdev/2018/02/02/asp-net-core-2-1-roadmap/

functionality / feature

All 5 comments

Also, use Microsoft.AspNetCore.App instead of Microsoft.AspNetCore.All
Use Partial Tag Helper in some places

ref: https://github.com/nopSolutions/nopCommerce/issues/2958

EFCore 2.1 has been available on Nuget
https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/

After I upgraded from core 2.0 to 2.1 I got the error:

Cannot consume scoped service 'XXXXX.Models.IAppDbContextRepository' from singleton 'Microsoft.AspNetCore.Authentication.IClaimsTransformation'.

From this line on startup:

services.AddSingleton<IClaimsTransformation, ClaimsTransformer>();

I had to change it to:

services.AddTransient<IClaimsTransformation, ClaimsTransformer>();

Any ideas why did this happened?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrnams picture mrnams  路  3Comments

rustybox picture rustybox  路  7Comments

tigran-avdalyan picture tigran-avdalyan  路  7Comments

AndreiMaz picture AndreiMaz  路  4Comments

AndreiMaz picture AndreiMaz  路  3Comments