When you have downloaded all of the code to you local drive, you should be able to open the solution in Visual Studio and successfully build all the code, since all the necessary DLL’s have been uploaded to github. If not, please let me know.
The solution uses EF code first to generate the database, which means you can generate a database by running a part of code.
Steps:
-
Open MvcSolution._Tests/MvcSolution.UnitTests/App.config. Change the connection string according to your SQL Server settings.
-
Open MvcSolution._Tests/MvcSolution.UnitTests/ DatabaseTests.cs. Change “DbName” const and then run “Can_RecreateDatabase” test that creates the database and all tables. Then run test “Can_Init_Database” that initializes all necessary data to run the application.
First, remember to change connection string in web.config. Then set “MvcSolution.Web.Main” as startup project and press F5 to run the web application in browser.
You should be able to run without errors, if not, please let me know.
Please be noticed that the MvcSolution.Web.Main project has no csharp files except for the only one Global.ascx.cs, while the other projects only contain csharp files, so the other projects will be only compiled to DLL’s.
Before you publish the application, you need to run MvcSolution.Web.Main /_grunt/ release.bat. Please refer to this link for detailed grunt usage in this solution.
When you have published the website to local file system, you should delete the “_js-source” folder, as the in use JS files are in the “Areas” already.
Regarding the later publishes, you can only keep the “Areas” and “bin” folders that will be applied to the live server and delete the other files and folders, which keeps the published files extreme simple.
Now that you can run the demo application in your browser, try to register a new user and navigate to the admin area and see how the website looks like.
Or you can get a quick look at http://mvcsolution.985rencai.com