3

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:

  • Probe assembly in user docs
  • Probe assembly in VS extensions
  • Probe assembly near the package assembly
  • Load toolbox items into the toolbox by calling IToolboxService.AddToolboxItem() method

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?

  • The Dialog shows the location from where the assemblies have been loaded, did you try to remove it from one of these locations, restart visual studio and check if it disappear? Ex: the first one is loaded from a VS extension located under appdata\local\microsoft.\..\w012gia.g0f – Haitham Shaddad Oct 03 '16 at 13:04

3 Answers3

2

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.
Anton Gogolev
  • 113,561
  • 39
  • 200
  • 288
  • I believe you meant `%LOCALAPPDATA%\Microsoft\VisualStudio\NN.N`. No, there are not files with this extension and I never seen such files in any `Microsoft\VisualStudio` folder of any version. – MikhailTymchukDX Oct 03 '16 at 13:47
  • 1
    @MikhailTymchukDX These are hidden files. Just to be sure -- do you have "Show hidden files" turned on? – Anton Gogolev Oct 03 '16 at 13:48
  • Holy crap, they are indeed hidden! I showed them, deleted and toolbox is ok now. Thank you! The funny thing that I read this answer at SO several times and always thought it should be visible. Could you please edit your answer to explicitly indicate this? – MikhailTymchukDX Oct 03 '16 at 13:53
0

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.

arrowd
  • 33,231
  • 8
  • 79
  • 110
  • Thank you for this tip, but these assemblies are not GACed. `Global Aseembly Cache` column title may be confusing, but my assemblies are loaded into the toolbox from the paths you can see on a screenshot and I don't call `gacutil` to register assemblies system-wise. – MikhailTymchukDX Oct 03 '16 at 12:24
0

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.

Cinchoo
  • 6,088
  • 2
  • 19
  • 34