让程序集显示在“添加引用”的 .NET 选项卡中
当使用 Visual Studio 并添加对项目的引用时,您会看到一个带有多个选项卡的窗口; .NET、项目、最近和浏览。 获得 .NET 列表下列出的项目需要什么?
我们认为 GAC 中有一些项目可以在那里列出,但事实并非如此。 我们正在寻找能够在一个非常大的开发团队中为我们的应用程序中的程序集获得更一致的参考路径的方法。
When working with Visual Studio and adding a reference to a project you are presented a window with multiple tabs; .NET, Project, Recent, and Browse. What is needed to get an item listed under the .NET listing?
We have items in the GAC which we thought would get them listed there, but they are not. We are looking for methods to be able to get more consistent reference paths for assemblies in our applications across a very large development team.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要创建一个注册表项来告诉 Visual Studio 显示哪些文件夹的程序集。 本文介绍了如何执行此操作:
http://www.platinumbay.com/blogs/dotneticated/archive/2008/09/02/add-reference-and-the-gac.aspx
我们不再使用 GAC,因为它这是一个繁琐的过程,并没有给我们的团队成员带来好处。 我们使用我们自己的程序集的项目引用来解决一致的路径问题。 第三方程序集位于解决方案中的一个文件夹中,我们从那里引用项目中的程序集。 这样每个人都走在同一条路上,没有后顾之忧。
You need to make a registry entry to tell Visual Studio which folders to show assemblies for. This article explains how to do it:
http://www.platinumbay.com/blogs/dotneticated/archive/2008/09/02/add-reference-and-the-gac.aspx
We don't use the GAC anymore as it is a cumbersome process that wasn't giving benefit to our team members. We solve the consistent path issues using project references for our own assemblies. Third party assemblies go in a folder within the solution and we reference the assemblies in the projects from there. This way everyone has them in the same path with no worries.
您需要添加一个注册表项,例如:
[HKEY_CURRENT_USER\SOFTWARE\Microsoft.NETFramework\AssemblyFolders\MyAssemblies]@="C:\MyAssemblies"
您可以在以下位置查看更多信息: http://support.microsoft.com/kb/306149
You need to add a registry key like:
[HKEY_CURRENT_USER\SOFTWARE\Microsoft.NETFramework\AssemblyFolders\MyAssemblies]@="C:\MyAssemblies"
You can see more on this at: http://support.microsoft.com/kb/306149
这可能是一个 VFAQ,尽管我是新来的。 这里的基本概念是根据注册表中的设置加载程序集列表。
您需要做的就是添加一个注册表子项,该子项指向以下项下的程序集位置:
如果 MyAssemblyFolder 是要添加的程序集所在的文件夹的名称,请在其中创建一个具有任意名称的子项,添加一个包含 MyAssemblyFolder 完整路径的字符串键。
This is probably a VFAQ, even though I'm quite new here. The basic concept here is that the list of assemblies is loaded based on a setting in the Registry.
All you need to do is to add a registry subkey which points to the location of the assembly under the following key:
If MyAssemblyFolder is the name of your folder where your Assembly to be added resides, create a subkey with any name and within it, add a String key with the complete path to your MyAssemblyFolder.
我创建了一个完全免费的工具,它将帮助您实现目标。 Muse VSReferences 将允许您添加通过添加 GAC 引用菜单项对项目进行全局程序集缓存引用。
问候,
Muse VSExtensions
I've created a tool which is completely free, that will help you to achieve your goal. Muse VSReferences will allow you to add a Global Assembly Cache reference to the project from Add GAC Reference menu item.
Regards,
Muse VSExtensions