本文介绍了如何安装/部署.NET DLL,使其出现在Visual Studio中添加引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试打包一组已编译的.NET DLL.这些包括x86. x64和AnyCPU构建相同的库(相同的DLL名称,不同的版本号和目标平台).

I'm trying to package a set of compiled .NET DLLs. These comprise x86. x64 and AnyCPU builds of the same library (same DLL name, different version numbers & target platforms).

我正在使用高级安装程序,但是-假设安装程序不可知,我如何确定自己的DLL最终用户安装我的MSI之后,是否在Visual Studio的添加引用"对话框中显示?

I am using Advanced Installer, however - assuming an installer agnostic environment, how can I make sure my DLLs show up in the Visual Studio Add-References dialog after an end-user installs my MSI?

定位VS2010和VS2012.感谢收到的任何帮助

Targetting VS2010 and VS2012. Any help gratefully received

推荐答案

我已经弄清楚,要使程序集对VS2012中的参考管理器可见,我需要添加此注册表项

I have figured out that to make an assembly visible to the Reference Manager in VS2012, I need to add this Registry Key

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\MyAsm
Value: <Directory on target PC of .NET4.0 assembly>

对于.NET4.5,我需要此密钥

And for .NET4.5, I need this key

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.5.50709\AssemblyFoldersEx\MyAsm
Value: <Directory on target PC of .NET4.5 assembly>

但是,这导致使用.NET4.5时出现两个DLL的另一个问题()

However this results in another problem of both DLLs showing up when using .NET4.5 (described here)

这篇关于如何安装/部署.NET DLL,使其出现在Visual Studio中添加引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 17:03