Server was previously running Nop 3.8. Installed .NET Core Windows Server Hosting bundle, restarted server. Downloaded Nop 4 source code version, clean build and publish to folder, then uploaded to server via FTP. Granted Modify/Read/Write permission to the folder.
Then I got this HTTP Error 502.5 - Process Failure error upon first launch.
Below are the log details from Event Viewer: .Net Runtime Application: Nop.Web.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.TypeLoadException Stack: at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(System.AggregateException ByRef) at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build() at Nop.Web.Program.Main(System.String[])
This is what found in the log after enable stdout Unhandled Exception: System.TypeLoadException: Could not load type 'System.AppContext' from assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors) at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build() at Nop.Web.Program.Main(String[] args)
I am also facing same issue when I noticed the log files:
Unhandled Exception: System.TypeLoadException: Could not load type 'System.AppContext' from assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildCommonServices(AggregateException& hostingStartupErrors) at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build() at Nop.Web.Program.Main(String[] args)
Let me know if this issue is resolved, Appreciate in case of any pointers / help which leads to resolve this issue.
In the "Upgrade guide to nopCommerce 4.00" (*) it's written: "All projects should target .NET Framework 4.6.1 and not .NET Core. We plan to use .NET Core only when EF Core team starts supporting all ORM functionality from the classic Entity Framework 6 (based on .NET Framework 4.6.1). Such as lazy loading, etc (they plan to do it in Q1-Q2 2018). That’s the only reason why we still use Entity Framework 6 (based on .NET Framework 4.6.1)"
I solve this issue istalling the .NET Framework 4.x.x on my server.
In the "Upgrade guide to nopCommerce 4.00" (*) it's written: "All projects should target .NET Framework 4.6.1 and not .NET Core. We plan to use .NET Core only when EF Core team starts supporting all ORM functionality from the classic Entity Framework 6 (based on .NET Framework 4.6.1). Such as lazy loading, etc (they plan to do it in Q1-Q2 2018). That’s the only reason why we still use Entity Framework 6 (based on .NET Framework 4.6.1)"
I solve this issue istalling the .NET Framework 4.x.x on my server.