全局添加cs库到visual studio

Add cs library to visual studio globally

我必须构建一个使用 Microsoft.Enterprice 库的解决方案。我安装了库 but VS still can't find the library。我无法更改解决方案(它非常大)。可以为 VS 全局添加库吗?提前致谢。

根据微软文档Enterprise Library 6 – April 2013,您可以尝试在nuget-package中搜索“enterpriselibrary”。

例如,您可以选择EnterpriseLibrary.Data并安装。

然后,您可以像下面这样使用它:

using Microsoft.Practices.EnterpriseLibrary.Data;

 static void Main(string[] args)
        {
            ConnectionString connstr = new ConnectionString("","","");            

        }

您可以从 here.

中找到对应的 class 库

评论更新: 如果要为 visual studio 全局安装 dll。你可以参考link How to: Install an assembly into the global assembly cache。然后,您可以在每个项目中使用来自 GAC 的程序集,而无需在 nuget 包中使用它。