MikhailTymchukDX
MikhailTymchukDX

Reputation: 720

How to remove duplicated assemblies from the Visual Studio Choose Toolbox Items dialog?

I have duplicated assemblies in the .NET Framework Components tab of a Choose Toolbox Items menu item: enter image description here

The full code for assembly loading can be found here, but the main idea is following:

The actual dll that is really loaded is v16.1.2.0.
v15.1.1.100 и 15.1.2.0 do not exist on a disk and I can't find any trace of these rudimentary assemblies on my disk and in registry.

How can I remove outdated entries from the list?

Upvotes: 3

Views: 1378

Answers (3)

Anton Gogolev
Anton Gogolev

Reputation: 115857

This situation is caused by the broken toolbox cache.

To fix it, try the following:

  • Close all instances of VS
  • Go do %LOCALAPPDATA%\Microsoft\VisualStudio\NN.N, where NN.N is the version of VS you're using
  • Delete all files with *.tbd extension. These files are hidden, so ensure that you have the approprate setting enabled.

Upvotes: 2

Cinchoo
Cinchoo

Reputation: 6332

These are registered design time assemblies / controls. These are specified in registry at the below location for each .NET framework under the AssemblyFoldersEx

Here are the locations

[HKCU or HKLM]\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v{version}\AssemblyFoldersEx
[HKCU or HKLM]\SOFTWARE\Microsoft\.NETFramework\v{version}\AssemblyFoldersEx

[HKCU or HKLM]\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Silverlight\v3.0\AssemblyFoldersEx
[HKCU or HKLM]\SOFTWARE\Microsoft\Microsoft SDKs\Silverlight\v3.0\AssemblyFoldersEx

Remove any duplicates by removing sub-keys.

Hope this helps.

Upvotes: 0

arrowd
arrowd

Reputation: 34421

Play around with gacutil.exe utility: https://msdn.microsoft.com/en-US/library/ex0ss12c(v=vs.110).aspx

You, probably, need to run gacutil.exe /l to get a list of all assemblies, then find those you want to delete and then run gacutil.exe /ur ... with respective values.

Upvotes: 0

Related Questions