I have spent 15 hours so far if not what appears to be an entire lifetime....
I have an old 3.9 installation which I was able to bring up to 4.30 and get it running perfectly.
But trying to upgrade to 4.40 always always always fails with this message: Setup failed: Sequence contains more than one element
I have tried everything. From top to bottom I have even did this:
Created a new install of 4.30 with brand new empty database with NO sample products. Then I ran the application and UNINSTALLED and DELETED all the plugins (empty collection of 'InstalledPlugins' in the plugins.json file...
Then in the 4.40 I also emptied the collection of 'InstalledPlugins' in the plugins.json file and ran the install -> pointed to my newly created 4.30 database and got the exact same result: Setup failed: Sequence contains more than one element
I have tried every thing in between trying to upgrade to my own 4.30 database with my products in it, then same thing without plugins....
Every possibilities have been explored, I even tried commenting out some migrations... and have always resulted in the same result: Setup failed: Sequence contains more than one element
I have made at least 25 different attempts with different parameters..
I am able to do a brand new install of 4.40 with its own brans new database...
also I want to add that when trying to just copy over the dataSettings.json file from ANY of my 4.30 experiments to ANY of my other 4.40 experiments: this ALWAYS results in the app issuing "too many redirects" and then we get to a browser based standard error page stating the error and suggesting to "clear my cookies" which did NOT work....
As I had mentioned in my post: I did try a brand new install of 4.3 which created its own empty database, and this database..... even this one I am not able to upgrade to 4.40.
If I run the setup and point to the 4.30 database I get this error message: Setup failed: Sequence contains more than one element
If I simply copy over the dataSetings.json from the 4.30 project to the 4.40 project: It gets caught in a loop of redirects.
The error message I get is: Setup failed: Sequence contains more than one element
Regarding Sequence contains more than one element, It means that "The problem is that you are using SingleOrDefault. This method will only succeed when the collections contains exactly 0 or 1 element. I believe you are looking for FirstOrDefault which will succeed no matter how many elements are in the collection." In nopCommerce v4.40, it is being used at Nop.Data.Mapping.FluentMigratorMetadataReader Where the GetAttribute method is trying to use your provided column name map at MappingBuilder via NameCompatibilityManager. It's expecting to have one mapping for one column definition but getting more than one. In short the meaning of it is, You provided more than one map for same column at least one of your mapping entity builder class. For example: Providing Map for CustomerId twice Reference: https://stackoverflow.com/a/1256784
And for, SSL redirection, Check your store URL & when you are in visual studio check Web Server Setting too.
I don't think you can "run the setup and point to the 4.30 database", because the tables already exists.
After you install a new 4.30, which will create empty 4.30 DB, copy these files from 4.30 folder to the 4.40 folder \App_Data\ dataSettings.json, plugins.json, appsettings.json
How did a brand new 4.30 install get SSL settings? If they are there, then I suggest you first update the DB Store table so that you can run the 'upgrade' not secure - e.g.
UPDATE [Store] SET [Url] = 'http://localhost:44369/' ,[SslEnabled] = 0