3

I want to get MVC Music Store tutorial application up and running with Visual Studio 2013/2015. Here are the steps that I've taken:

  1. downloaded the latest version from Downloads page
  2. unpacked it
  3. opened it with Visual Studio 2013/2015 - got a migration report without errors but with some warnings
  4. tried to build the solution, but it won't build - got a plenty of errors about missing type/namespace like that:

The type or namespace name could not be found (are you missing a using directive or an assembly reference?)

How do I build and run locally the MVC Music Store project with Visual Studio 2013/2015?

Deilan
  • 4,740
  • 3
  • 39
  • 52
  • 2
    What errors are you getting? It is likely that you need to install the MVC nuget packages https://www.nuget.org/packages/Microsoft.AspNet.Mvc/ – harsimranb Feb 24 '15 at 18:05
  • @Delian Yes, there are bunch. This post highlights them well. http://stackoverflow.com/a/12000511/487940 – harsimranb Feb 24 '15 at 18:35

3 Answers3

8

There are two ways:

1) Download and install ASP.NET MVC 3 Tools from the official ASP.NET MVC 3 page or from Microsoft Download Center. It will install the required DLLS into the GAC.

2) Install the corresponding ASP.NET MVC 3 NuGet package into MvcMusicStore project using following command in the Package Manager Console:

Install-Package Microsoft.AspNet.Mvc -Version 3.0.50813.1

or

Install-Package Microsoft.AspNet.Mvc -Version 3.0.20105.1

After using either of the described ways you will be able to successfully build and run the MVC Music Store tutorial application.

Note that these ways are not conflicting with each other, so you may safely install ASP.NET MVC 3 Tools into your OS and install ASP.NET MVC 3 NuGet package into the project.

Deilan
  • 4,740
  • 3
  • 39
  • 52
0
Install-Package Microsoft.AspNet.Mvc -Version 3.0.20105.1

Worked for me instead of Version 3.0.50813.1

N.D.B
  • 443
  • 7
  • 25
0

I was running into the same problem as other mentioned here, tried installing the nuget package and was still getting an error.

My solution after following other advice here by installing the nuget package, the key to my solution was to make sure the project targeted "Microsoft Framework 4.0". I.E. Right mouse on the project node in the solution explorer, select properties, and within the "Application" page for the project select ".Net Framework 4.0".

All is working fine for me after this, seems VS was defaulting to 4.5.1.

HTH.

dan d:)

Dano
  • 112
  • 7