开发者

Cannot see my assembly in .NET tab of Add Reference dialog

To make my own assemblies appear in the .NET tab's list of Add Reference dialog, I added HKLM\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\MyAssemblies registry key. Then I changed default string value to "C:\Common\". Exactly like Microsoft How-to recommends. However, I fail to see my assemblies that located in C:\Common folder in the list of my .NET tab's list.

I'm using VS 2010.

Any idea what I开发者_开发技巧'm doing wrong?


Given that VS2010 is the first version for a while that has a new runtime, I suspect that the required registry key has changed.

Otherwise assemblies listed for VS2008 (and it's 2.0 runtime) would be incorrectly listed for VS2010.

So, to make it work, you'll need to find the new key.

Update: I think that the information you need is here: http://msdn.microsoft.com/en-us/library/wkze6zky.aspx

Specifically, the path is now

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\VersionMinimum\AssemblyFoldersEx\MyAssemblies]@="AssemblyLocation"

where

  • VersionMinimum is the lowest .NET Framework version that applies. If VersionMinimum is v3.0, folders specified in AssemblyFoldersEx apply to projects that target .NET Framework 3.0 and later.
  • AssemblyLocation is the directory of the assemblies that you want to appear in the Add Reference dialog box, for example, C:\MyAssemblies.


Add your new key/value to:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\MyAssemblies]
@="C:\\My\\Assembly\\Folder\\"

for 64 bit machines. Remember to include a trailing backslash in your path.

When I added the same key/value to the v3.0 folder, it had no effect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜