Visual Studio 2015 Preview/ASP.NET 5 Core Framework: Type or Namespace Dictionary<,> does not exist

asp.net-core, visual-studio-2015

Solution

Add system.collections to your core dependencies, or remove the core framework.

    "frameworks" : {
        "aspnet50" : { },
        "aspnetcore50" : { 
            "dependencies": {
               "System.Collections": "",
                "System.Console": "4.0.0-beta-22231"
            }
        }
    }

Problem

I downloaded the Visual Studio 2015 Preview from Microsoft's website (Version 14.0.22310.1 DP), clicked File -> New Project -> ASP.NET 5 Console Application, generating the default template. Everything builds thus far. I added the line (`var dictionary = new System.Collections.Generic.Dictionary<string, string>();`) resulting in the entry method listed below. ``` public void Main(string[] args) { var dictionary = new System.Collections.Generic.Dictionary<string, string>(); Console.WriteLine("Hello World"); Console.ReadLine(); } ``` However, on build, the compiler is telling me that the Generic Dictionary implementation is not present in the Core framework. The error message is below: Error CS0234 The type or namespace name 'Dictionary' does not exist in the namespace 'System.Collections.Generic' (are you missing an assembly reference?) ProjectName.ASP.NET Core 5.0 Program.cs 9 ``` project.json file: { "version": "1.0.0-*", "dependencies": { }, "commands": { "run" : "run" }, "frameworks" : { "aspnet50" : { }, "aspnetcore50" : { "dependencies": { "System.Console": "4.0.0-beta-22231" } } } } ``` Under project properties -> application tab. Target KRE Version is the default: KRE-CLR-x86.1.1.0-beta 1. Unfortunately, the standard Google and StackOverflow search didn't yield the answer. Any ideas?

Original source