Debugging V3.90

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 года назад
Hi All,

I'm trying to debug via VS2017 and find that the site loads but thinks it is a new installation (makes sense).  How can I set the database connection up so it works in debug mode?

Regards,
Paul
4 года назад
Did you mean, haw to connect an existing database with nopCommerce project?
4 года назад
Yes that's correct, so I don't need to go through the install screen each time.

Cheers,
Paul
4 года назад
To change the database used by Nopcommerce you need to change the connection string.

In Nopcommerce 3.9 it can be found in Nop.Web/App_Data/Settings.txt

In Nopcommerce 4.0+ it can be found in Nop.Web/App_Data/dataSettings.json

If you change this connection string and then start Nopcommerce it should connect to the new database.

If you delete the file and then start Nopcommerce you should be redirected to the installation page. The file will be recreated as part of a new installation.
4 года назад
Note that in an source code environment, the folder is \Presentation\Nop.Web\App_Data.
Additionally, if your existing database was from a system where plugins were installed, then you will probably also need to get that system's \App_Data\InstalledPlugins.txt file and put it in your \App_Data folder, and be sure the \Presentation\Nop.Web\Plugins folder has the plugin sub folders you need.  If you don't do that, and try to "install" the plugins, then some might fail since their DB tables already exist.  (As does their settings).
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.