Visual Studio AddIn not showing, a workaround

Mar 9, 2011 at 7:32 AM
Edited Mar 9, 2011 at 7:35 AM


I had the same problem, Xsd2Code 3.3beta3 and XsdCode 3.4 did not show the rightclick menu when clicking on a .xsd file. A problem some other users reported too.

I really wanted to know what was happening so i loaded the sources for 3.4 and started to debug the Addin.

What i found out was that at startup in OnConnection() there was an exception in the call applicationObjectField.Commands.AddNamedCommand().

The exception was (i don't remember it exactly): A command with that name already exists.

I put a loop just before the call to print out all commands in applicationObjectField.Commands and really, a command with name Xsd2Code.Addin.Connect.Xsd2CodeAddin already existed.

I have no idea why. I uninstalled Xsd2Code again and searched everywhere on my hard disk for a trace of another installation. I even used FINDSTR on the command line to look for the string "Xsd2Code" in all files under User\AppData, ProgramData and C:\Program (x86) and i found nothing.

So, as a workaround i changed the command name in the sources from Xsd2CodeAddin to Xsd2CodeAddin2, changing it in the three places in AddNamedCommand, QueryStatus and Exec, then I built the setup files again.

I installed the modified version and the context menu now worked!





My system: Windows 7 Ultimate 64bit and Visual Studio 2010 Professional.


Mar 9, 2011 at 7:42 AM

If you want to try it out, i have put the modified version of the Addin DLL of Xsd2Code 3.4 here:

Mar 27, 2011 at 12:30 AM

Thank you, you help me to solve the problem :

Go to Menu Tools/Customize/Commands, Select "Context Menu" et move to "Project and solution Context Menu | Items".

Now Click on "Add Command", select AddIns, and "Run Xsd2Code generation".

OK, Close : The context menu is back !!

May 5, 2011 at 12:07 AM

Hi all,

Tried it all but I cannot get the menu item to display,  "Run Xsd2Code generation" is not an available as a command. 

Any suggestion appreciated.


Jun 20, 2011 at 11:21 AM

Hi everyone

I also have the same problem Vincent describes.  (VS2010 Premium on Windows 7 Ultimate x64)

I have installed the latest download (3.4) and it does not appear on my right click menu.  I tried the alternative DLL mentioned above as well as the Customize menu option, but nothing works.  The 'Run Xsd2Code generation' command does not appear in the list of AddIns commands.  It's as if my VS is completely unaware that the AddIn is installed.

Any help would be appreciated.


Jun 28, 2011 at 2:32 PM

Hello Everyone,

I had this issue running Visual Studio 2010 (SP1) under 64bit Windows 7 Enterprise (SP1).

The add-in would not show on the context menu or in the add-in manager, no matter what I tried.

I wondered if it might be a permissions problem with the installer, so I started an Admin Command Prompt (as 'Run as Admin' isn't available for MSI files) ran the installer and this solved the problem.

I hope this helps.

Regards, ifdef

Jul 4, 2011 at 6:35 AM

I couldn't get it to work either... this fixed it for me

Jul 14, 2011 at 9:39 AM
Edited Jul 14, 2011 at 9:39 AM

Moving the addin as descript in the link above to the correct user folder solved my problem.


Jul 28, 2011 at 11:59 AM

Hi All,

I'm on a new Windows 7 machine now with the same issue, but this time nothing I do installs the Addin correctly or shows the context menu.

Our profile are roaming and sit on a DFS, i.e. "\\<domain>\windows7$\profiles\<username>\UserData\Documents" (this is the folder that the Windows API report for "My Documents")

Underneath this I can see the folder "Visual Studio 2010\Addins" but Xsd2code does not install the Addin no matter what I try.

Any suggestions?

Regards, ifdef

Feb 21, 2012 at 5:14 PM

Hi All,

I've changed the tag <assembly> in the xsd2code.adin.adin to below

    <Assembly>C:\Program Files (x86)\Xsd2Code\Xsd2Code.Addin.dll</Assembly>

and get xsd2code working well in VS 2010 on Windows 7.



Mar 25, 2012 at 9:34 PM
Filimindji wrote:

Thank you, you help me to solve the problem :

Go to Menu Tools/Customize/Commands, Select "Context Menu" et move to "Project and solution Context Menu | Items".

Now Click on "Add Command", select AddIns, and "Run Xsd2Code generation".

OK, Close : The context menu is back !!

Thanks !!!

Jun 8, 2012 at 7:37 PM

I had the same problem, than I realize I was in an website project.
I tried to customize the right click menu like Filimindji said (but in Project and solution Context Menu | Web Items ), I succeed in showing the option but still no code generation after accessing it.
I managed to generate code after I changed the project to web app.

Mar 27, 2013 at 8:06 PM
My environment Window7 - VS2010 SP1. After trying all possibilities, the simplest solution works for me
  • Find where xsd2code installs the Add in => Possible in c:\users[YourName]\My Documents\Visual Studio 2010\Addins or c:\Visual Studio 2010\Addins
  • In Visual Studio. Go to Tools->Options->Add-in/Macros Security->Add
  • Find the path of AddIns and add to this option.
  • Restart your computer.
  • The "Run Xsd2Code generation" will be available when you right click on .Xsd