Just another WordPress site


Help with ASP.NET MVC 4 Mobile App Development Sample Code

If you're running the source code in the book directly, the original distributions did not include the .nuget folder and the NuGet packages needed to build the solution.  This is in the spirit of NuGet but not, perhaps, in the spirit of source code accompanying a book.  The fix is fairly straight forward: enable the solution to restore the NuGet packages.

To enable a NuGet package restore, open the solution having a problem loading the project, right click the solution, and select "Enable NuGet Package Restore" on the context menu.

The solution will now build, but you may receive an error that resembles the following.

This is because the database doesn't exist and the membership provider is trying to create tables in a non-existent database.  To create the database, simply run the Update-Database command in the Package Manager console.

Occasionally, the package manager console will tell you Update-Database is an unrecognized cmdlet.  This appears to be a bug in Visual Studio you can fix by restarting, though some reports state that an occasional reboot is required.

I will be posting the entire source code for each chapter to my blog and will also make revised solutions that run "out of the box" available on the Packt website.


Comments (0) Trackbacks (0)

No comments yet.

Leave a comment

No trackbacks yet.