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

There is no clear answer for this question. I managed to fix the project only by re-creating it, and then downloading all the DLLs in a different order, closing and re-opening the visual studio several times while doing it.

Aparently there was some conflict between some of the packages, but that was impossible to guess until I had re-created the project from scratch again.

Running Install-Package Microsoft.AspNet.Web.Optimization did solve the problem after the clean install however, so I recommend it.

I thank everyone for the help.


PM> Install-Package Microsoft.AspNet.Web.Optimization


Install Microsoft.AspNet.Web.Optimization on the NuGet Package Manager. If it's already installed but not working try install a previous version and then the last version again. Worked for me, :)