Installing new instances of nopCommerce 2.0
From:http://csharpwebdeveloper.com/installing-reinstalling-nopcommerce-2
This article describes the installation process and how to "re-install" your database during development cycles. This article is less technical than most of the articles you will find on this site.
Prerequisites
- Visual Studio 2010
- nopCommerce 2.0 source code
- A supported version of SQL Server (e.g. 2005, 2008, DENALI)
- ASP.NET MVC3
Initial Installation
nopCommerce uses Entity Framework 4 and fluent mappings for a persistence mechanism. During the initial installation of nopCommerce 2.0 (not an upgrade, but a clean install) nopCommerce generates the database by analyzing the EF4 entities and the associated mapping classes.
- Create a blank database named "NopCommerceTutorial".
- Start Visual Studio 2010 and load the nopCommerce solution.
- (f5) Debug the project.
- Complete the installation configuration seen in the image below.
- nopCommerce will create the appropriate tables in the empty database provided.

After a minute or two the installation will be completed and you've successfully installed nopCommerce.
Re-Installation
During the development process numerous database schema changes will be required. To ensure that my EF4 mappings are correct I like to run the installation process frequently to verify the database tables are created as I intended.
To do this the following steps are required:
- Stop the web server.
- Delete the database and close any existing database connections or the database will not be deleted.
- Delete the following files:
- [Project Root]\Presentation\Nop.Web\AppData\InstalledPlugins.txt
- [Project Root]\Presentation\Nop.Web\AppData\Settings.txt
- Repeat the initial installation steps.
ONLY PERFORM REINSTALL ON DEVELOPMENT ENVIRONMENT. DATA WILL BE LOST.
nopCommerce uses the settings.txt file to determine if the installation process should be run. If the file doesn't exist then nopCommerce will redirect users to the installation page.
浙公网安备 33010602011771号