C# .net core 使用NameValueCollection类

微软更新了.net core的一些引用规则,详见GitHub的Issue.
其中包含了原来的NameSpace:
– System.Collections.NonGeneric
– System.Threading.Overlapped
– System.Collections.Specialized
– System.Xml.XmlDocument

因此原来只需using 引入的,而现在需要变成安装依赖包的方式了。
VS2017打开程序包管理器控制台,安装Install-Package System.Collections.Specialized即可安装到项目文件.csproj中,使用NameValueCollection便不会提示错误。