Download nop 4.2 source and upgrade script corrupt, Project will not start

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hi there,
I am trying to upgrade to nopcommerce 4.2 but it turned out, that the files at the main page
are corrupt.
So I turned to github and downloaded it from there.
Now it was possible to have the project started, but then, got another error.
This time in Visual Studio. It just refuses to compile with error error NETSDK1045.
The current .NET SDK does not support  .NET Core 2.2 as a target

I am getting a bit frustrated now
4 years ago
What version of Visual Studio are you using ?
I am using Visual Studio Community 2019 V16.1.5
Also make sure you have the lastest version of .NETCore
4 years ago
You need to install SDK for ASP.NET Core 2.2. :)


4 years ago
Thank you that worked.

Yes I use VS2019

Still can not start it, because I get another error.... about fetching
and wrong sysntax in the vicinity of "Offset"


System.Data.SqlClient.SqlException
  HResult=0x80131904
  Nachricht = Falsche Syntax in der Nähe von 'OFFSET'.
Ungültige Verwendung der Option NEXT in der FETCH-Anweisung.
  Quelle = Core .Net SqlClient Data Provider
  Stapelüberwachung:
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.<_TrackEntities>d__17`2.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
   at System.Collections.Generic.List`1.AddEnumerable(IEnumerable`1 enumerable)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Nop.Core.PagedList`1..ctor(IQueryable`1 source, Int32 pageIndex, Int32 pageSize, Boolean getOnlyTotalCount) in C:\Daten\Onlinesourcen\nopCommerce-release-4.20\src\Libraries\Nop.Core\PagedList.cs:line 34
   at Nop.Services.News.NewsService.GetAllNews(Int32 languageId, Int32 storeId, Int32 pageIndex, Int32 pageSize, Boolean showHidden) in C:\Daten\Onlinesourcen\nopCommerce-release-4.20\src\Libraries\Nop.Services\News\NewsService.cs:line 126
   at Nop.Web.Factories.NewsModelFactory.<PrepareHomepageNewsItemsModel>b__16_0() in C:\Daten\Onlinesourcen\nopCommerce-release-4.20\src\Presentation\Nop.Web\Factories\NewsModelFactory.cs:line 165
   at EasyCaching.InMemory.DefaultInMemoryCachingProvider.BaseGet[T](String cacheKey, Func`1 dataRetriever, TimeSpan expiration)
   at EasyCaching.Core.EasyCachingAbstractProvider.Get[T](String cacheKey, Func`1 dataRetriever, TimeSpan expiration)
4 years ago
I configured the database and it just does not connect ....
4 years ago
I have found out that my winrar was the one that did not unpack the files so the files themselves are not corrupt. I just had to reinstall rar
4 years ago
I found also the error with the database,.... the version I was using was beyond old (SQL Server 2008). I moved to SQL Server 2016 version and everything runs smooth.....
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.