Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: [1] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) Multiple tool bar buttons and menus? - Please read (Read 39646 times)
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Multiple tool bar buttons and menus? - Please read
Oct 12th, 2011 at 12:14pm
Print Post  
If the addin fails to load first time then it can cause buttons and menus to be duplicated each time visual studio loads

Running the following command clears all of the arduino buttons and menus froms visual studio

•Close all IDE instances. 
•Open a Visual Studio .NET Command Prompt ("Run...", "Programs", "Visual Studio .NET", "Visual Studio .NET Tools", "Visual Studio .NET Command Prompt")
•Enter "
devenv.exe /resetaddin Visual.Micro.Visual.Studio.Arduino.Helper" (without the quotes) and press ENTER

If you have multiple copies of visual studio installed then you might have to QUALIFY the path to your visual studio 2010 devenv.exe

When you run the resetaddin command, if Visual Studio opens any windows you can cancel and close them.

After the reset you will know if it has worked. You should see only one of each button and menu item if the addin is installed and you should not see any buttons or menus if the addin is not installed

We will shortly produce a version that alerts users to any issues and prevents duplicate items. 

However, if you keep getting issues please let us know what version of visual studio you are using and which language Visual Studio is running (french, chinese etc)
« Last Edit: Oct 13th, 2011 at 10:11pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
fettoir
Junior Member
**
Offline


Posts: 21
Location: france
Joined: Apr 11th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #1 - Oct 23rd, 2011 at 7:27am
Print Post  
I followed your instructions: at first start only a menu appears, but the second, again the multiple menus appear, my version : VS 2010 Ultimate version French
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #2 - Oct 23rd, 2011 at 11:24am
Print Post  
hi,

do you also get multiple tool bar buttons?

can you switch on the trace in the tools>options>vm>version and also set read/write permissions to where you installed the addin

then start vs, stop vs, then email the trace.txt file that will appear in the vm install folder

thanks
  
Back to top
WWW  
IP Logged
 
Barry
Newbies
*
Offline


Posts: 1
Joined: Oct 22nd, 2011
Re: Multiple tool bar buttons and menus? - Please read
Reply #3 - Oct 24th, 2011 at 4:09pm
Print Post  
For info:  I had the multiple menus and a message saying stdole missing (or similar) each time VS started.  I had installed VS2010 (English) with C++ option only, onto a clean OS.  I solved this by also installing the MS Office and VB.net options in VS.  I assume one of these installs stdole onto the machine.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #4 - Oct 24th, 2011 at 4:14pm
Print Post  
(Updated)
That's very interesting thanks very much for posting. This is probably the issue affecting 2 or 3 other users.

PLEASE MAKE SURE THAT THE FOLLOWING ARE INSTALLED:- MS OFFICE and also VB.NET options in VS

The addin does require an installation of Visual Studio with C++,C# and VB.NET. The VB.NET will shortly be dropped. Ms Office is required because Visual Studio uses the Office Command Bars. 

I will update codeplex with a note about this.

Thanks for the post, if anyone has multiple control problems then please post to let us know. Thanks
« Last Edit: Nov 8th, 2011 at 4:44pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
fettoir
Junior Member
**
Offline


Posts: 21
Location: france
Joined: Apr 11th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #5 - Oct 29th, 2011 at 6:35pm
Print Post  
here is my trace.txt file :
CreateCommandBarItemsPerm      Begin AddinVer=18
Adding      Tool bars and combos
CreateCommandBarItemsPerm      End
Create command bar items      Begin
CreateCommandBarItems      Begin AddinVer=18
GetCommands      Commands2
Get Bar      Tools
Create Bar      Tools>Arduino
Adding      Tools>Ports
Adding      Tools>Programmers
Adding      Tools>Using Programmer
Adding      Tools>Burn Bootloader
Adding      ToolBar-Lib-Items
Adding      ToolBar-Lib-User
Added      ToolBar-Lib-Items
Adding      ToolBar-Board-Items
Adding      ToolBar-SerialPorts-Items
Create command bar items      End
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #6 - Oct 29th, 2011 at 9:05pm
Print Post  
@fettoir,

Thanks for the trace, no errors but here is some info...

The way any vs addin works is that after install (or resetaddin) vs sends a setup() command to the addin just once. When the setup is called the addin writes the following trace entry:-

CreateCommandBarItemsPerm      Begin AddinVer=18

I think that your trace is not after a resetaddin so we need to know why VS is not doing what it is documented to do. It keeps wrongly thinking it needs to call the addin for setup()

Can you please confirm that the trace looks the same every time you start VS. And also what extensions or other addins you have loaded. I would like to replicate your enviroment.

Thanks
  
Back to top
WWW  
IP Logged
 
fettoir
Junior Member
**
Offline


Posts: 21
Location: france
Joined: Apr 11th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #7 - Oct 30th, 2011 at 8:28am
Print Post  
my environement :
win7 64 professional french
visual studio 2010 ultimate french

before install this version i've uninstall the old versions  (vs2008 & VS2010) of visual micro.

for info i haven't this problem with vs2008 (works fine)

here is the trace after some restart :
CreateCommandBarItemsPerm      Begin AddinVer=18
Adding      Tool bars and combos
CreateCommandBarItemsPerm      End
Create command bar items      Begin
CreateCommandBarItems      Begin AddinVer=18
GetCommands      Commands2
Get Bar      Tools
Create Bar      Tools>Arduino
Adding      Tools>Ports
Adding      Tools>Programmers
Adding      Tools>Using Programmer
Adding      Tools>Burn Bootloader
Adding      ToolBar-Lib-Items
Adding      ToolBar-Lib-User
Added      ToolBar-Lib-Items
Adding      ToolBar-Board-Items
Adding      ToolBar-SerialPorts-Items
Create command bar items      End
CreateCommandBarItemsPerm      Begin AddinVer=18
Adding      Tool bars and combos
CreateCommandBarItemsPerm      End
Create command bar items      Begin
CreateCommandBarItems      Begin AddinVer=18
GetCommands      Commands2
Get Bar      Tools
Create Bar      Tools>Arduino
Adding      Tools>Ports
Adding      Tools>Programmers
Adding      Tools>Using Programmer
Adding      Tools>Burn Bootloader
Adding      ToolBar-Lib-Items
Adding      ToolBar-Lib-User
Added      ToolBar-Lib-Items
Adding      ToolBar-Board-Items
Adding      ToolBar-SerialPorts-Items
Create command bar items      End
Create command bar items      Begin
CreateCommandBarItems      Begin AddinVer=18
GetCommands      Commands2
Get Bar      Tools
Create Bar      Tools>Arduino
Adding      Tools>Ports
Adding      Tools>Programmers
Adding      Tools>Using Programmer
Adding      Tools>Burn Bootloader
Get      CustomToolBarObjects
Adding      ToolBar-Lib-Items
Adding      ToolBar-Lib-User
Added      ToolBar-Lib-Items
Adding      ToolBar-Board-Items
Adding      ToolBar-SerialPorts-Items
Create command bar items      End
CreateCommandBarItemsPerm      Begin AddinVer=18
Adding      Tool bars and combos
CreateCommandBarItemsPerm      End
Create command bar items      Begin
CreateCommandBarItems      Begin AddinVer=18
GetCommands      Commands2
Get Bar      Tools
Create Bar      Tools>Arduino
Adding      Tools>Ports
Adding      Tools>Programmers
Adding      Tools>Using Programmer
Adding      Tools>Burn Bootloader
Adding      ToolBar-Lib-Items
Adding      ToolBar-Lib-User
Added      ToolBar-Lib-Items
Adding      ToolBar-Board-Items
Adding      ToolBar-SerialPorts-Items
Create command bar items      End
« Last Edit: Oct 30th, 2011 at 9:02am by fettoir »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #8 - Oct 30th, 2011 at 10:25am
Print Post  
thanks. both 2008 and 2010 use the same code so this will probably turn out to be a vs 2010 quirk

we have many 64 bit users so it isn't specific to a vs version

do you have any other addins showing in extension manager or addin manager?

can you try running vs with admin permissions to see if it fixes the problem. do you know how to run a program as administrator?

tx
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #9 - Oct 30th, 2011 at 11:04pm
Print Post  
@fettoir please also try to confirm what exactly is repeating. for example:-
is the boards list on the tool bar repeating?
is the arduino entry on the tools menu repeating?
if the File>Open>Arduino Project repeated?

Thanks
  
Back to top
WWW  
IP Logged
 
Niki_77
Junior Member
**
Offline


Posts: 12
Joined: Nov 1st, 2011
Re: Multiple tool bar buttons and menus? - Please read
Reply #10 - Nov 1st, 2011 at 5:26pm
Print Post  
Hi to all.
Same problem for me, visual studio 2008 team system.
Win7 ultimate 64bit.
Above my trace :

Create command bar items      Begin
CreateCommandBarItems      Begin AddinVer=18
GetCommands      Commands2
Get Bar      Tools
Create Bar      Tools>Arduino
Adding      Tools>Ports
Adding      Tools>Programmers
Adding      Tools>Using Programmer
Adding      Tools>Burn Bootloader
Get      CustomToolBarObjects
Adding      ToolBar-Lib-Items
Unable to create command bar items      Valore non compreso nell'intervallo previsto.

The text in bold is a specific italian error message , in english sounds like Index out of bound problem.

After a little analisys with reflector, i think the problem is in RefreshCommandBarLibsMenu() in the first foreach cycle, when try to AddCommandBarButton() , because outside this cycle is immediately present other trace message not present on my log.
I hope this help.





« Last Edit: Nov 1st, 2011 at 5:27pm by Niki_77 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #11 - Nov 1st, 2011 at 5:38pm
Print Post  
Hi Nicola,

Your problem is slightly different to the vs 2010 problem.

Some info...

You can clear any duplicates by running the resetaddin that is documented on the site.

The index out of bounds error is usually boards and libs that can't be found. A user had the same problem that you had because they had not set the arduino.exe location in the opions. What location have you set for the arduino.exe?

Thanks
  
Back to top
WWW  
IP Logged
 
Niki_77
Junior Member
**
Offline


Posts: 12
Joined: Nov 1st, 2011
Re: Multiple tool bar buttons and menus? - Please read
Reply #12 - Nov 1st, 2011 at 6:11pm
Print Post  
Hi.

The location of my installation is D:\arduino-0022 , and is correctly set, because if i try to write a simple code and compile it work perlectly.
I think is only a problem building the library menu items.

I've installed the visual micro in other laptop with no problem.

Update.

PROBLEM SOLVED.


The problem is the ".svn" subversion source control folder!
I've try to remove the "libraries" folder from the source control and now working great.
By the way I think is important to plan a code modify for a workaround in a next version.

 



« Last Edit: Nov 1st, 2011 at 6:32pm by Niki_77 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #13 - Nov 1st, 2011 at 6:41pm
Print Post  
oh what a star! we'll get that fixed

thanks very much, i've added a codeplex issue report
  
Back to top
WWW  
IP Logged
 
Niki_77
Junior Member
**
Offline


Posts: 12
Joined: Nov 1st, 2011
Re: Multiple tool bar buttons and menus? - Please read
Reply #14 - Nov 1st, 2011 at 8:18pm
Print Post  
Hi, 
i've see the entry in odeplex but i think is a little bit improper description.

Code
Select All
Description
.svn source control on lib folders causes duplicate tool bar items and index out of range errors 



I think is impossible that the .svn folder can cause duplicate item, but only index out of bound error.

Thanks to us for the very interesting add-in.
I hope can help us again.


  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #15 - Nov 1st, 2011 at 8:42pm
Print Post  
you might be right, it' actually a bug that causes the duplicates and the out of range error but caused by .svn stuff.

Until we investigate the actual reason (files and folders that start with a . should be ignored) I couldn't think of a better description.

I guess it's more of a reminder for when it gets tested and fixed Smiley

Thanks again, it's nice having members like you.

ps: visual studio is very sensitive to errors. after an error it can often return null when testing for the existence of a UI object. In this case the argument out of range is also causing vs to get a bit confused. So in a way this does end up causing duplicates because the addin keeps being told elements are missing when they are not.
« Last Edit: Nov 1st, 2011 at 8:46pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #16 - Nov 1st, 2011 at 9:39pm
Print Post  
nicola,

a question. i've just looked at my libraries and many of them have .svn sub folders which are being ignored and are not causing a problem.

please can you describe where the .svn folder should be to cause a problem?

thanks
  
Back to top
WWW  
IP Logged
 
Niki_77
Junior Member
**
Offline


Posts: 12
Joined: Nov 1st, 2011
Re: Multiple tool bar buttons and menus? - Please read
Reply #17 - Nov 1st, 2011 at 11:26pm
Print Post  
Hi,

Really i've only one, hidden .svn folder under libraries root.
In this case i haven't enought .svn folder in the single library subdirectory.

I try to attach an image



the hidden folder on the top of the explorer windows is the one generating the error.
I think the error occurr enumerating the directory in the libraries folder, and any of the AddCommandBarButton() parameter don't like a string starting with "." (dot)

I hope this help you.
« Last Edit: Nov 1st, 2011 at 11:38pm by Niki_77 »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #18 - Nov 1st, 2011 at 11:57pm
Print Post  
ah! the routine that gets the lib list. forgot about that one

thanks again, it should be sorted within the next week
  
Back to top
WWW  
IP Logged
 
fettoir
Junior Member
**
Offline


Posts: 21
Location: france
Joined: Apr 11th, 2010
Re: Multiple tool bar buttons and menus? - Please read
Reply #19 - Dec 29th, 2011 at 11:56pm
Print Post  
i'va always the same problem :
i've remove visual micro and old addin from previous version.
i've remove all entry visual micro  in registry ...
i've remove all ".svn" or ".something" directory from the arduino libraries folders...
only Arduino boards and arduino Serial Communication are duplicated.
here is my trace file after few visual studio runs
any ideas ?? Shocked
Code
Select All
CreateCommandBarItemsPerm	Begin AddinVer=21
Adding	Tool bars and combos
CreateCommandBarItemsPerm	End
Create command bar items	Begin
CreateCommandBarItems	Begin AddinVer=21
GetCommands	Commands2
Get Bar	Tools
Create Bar	Tools>Arduino
Adding	Tools>Ports
Adding	Tools>Programmers
Adding	Tools>Using Programmer
Adding	Tools>Burn Bootloader
Adding	ToolBar-Lib-Items
Adding	ToolBar-Lib-User
Added	ToolBar-Lib-Items
Adding	ToolBar-Board-Items
Adding	ToolBar-SerialPorts-Items
Create command bar items	End
CreateCommandBarItemsPerm	Begin AddinVer=21
Adding	Tool bars and combos
CreateCommandBarItemsPerm	End
Create command bar items	Begin
CreateCommandBarItems	Begin AddinVer=21
GetCommands	Commands2
Get Bar	Tools
Create Bar	Tools>Arduino
Adding	Tools>Ports
Adding	Tools>Programmers
Adding	Tools>Using Programmer
Adding	Tools>Burn Bootloader
Adding	ToolBar-Lib-Items
Adding	ToolBar-Lib-User
Added	ToolBar-Lib-Items
Adding	ToolBar-Board-Items
Adding	ToolBar-SerialPorts-Items
Create command bar items	End
CreateCommandBarItemsPerm	Begin AddinVer=21
Adding	Tool bars and combos
CreateCommandBarItemsPerm	End
Create command bar items	Begin
CreateCommandBarItems	Begin AddinVer=21
GetCommands	Commands2
Get Bar	Tools
Create Bar	Tools>Arduino
Adding	Tools>Ports
Adding	Tools>Programmers
Adding	Tools>Using Programmer
Adding	Tools>Burn Bootloader
Adding	ToolBar-Lib-Items
Adding	ToolBar-Lib-User
Added	ToolBar-Lib-Items
Adding	ToolBar-Board-Items
Adding	ToolBar-SerialPorts-Items
Create command bar items	End
CreateCommandBarItemsPerm	Begin AddinVer=21
Adding	Tool bars and combos
CreateCommandBarItemsPerm	End
Create command bar items	Begin
CreateCommandBarItems	Begin AddinVer=21
GetCommands	Commands2
Get Bar	Tools
Create Bar	Tools>Arduino
Adding	Tools>Ports
Adding	Tools>Programmers
Adding	Tools>Using Programmer
Adding	Tools>Burn Bootloader
Adding	ToolBar-Lib-Items
Adding	ToolBar-Lib-User
Added	ToolBar-Lib-Items
Adding	ToolBar-Board-Items
Adding	ToolBar-SerialPorts-Items
Create command bar items	End
CreateCommandBarItemsPerm	Begin AddinVer=21
Adding	Tool bars and combos
CreateCommandBarItemsPerm	End
Create command bar items	Begin
CreateCommandBarItems	Begin AddinVer=21
GetCommands	Commands2
Get Bar	Tools
Create Bar	Tools>Arduino
Adding	Tools>Ports
Adding	Tools>Programmers
Adding	Tools>Using Programmer
Adding	Tools>Burn Bootloader
Adding	ToolBar-Lib-Items
Adding	ToolBar-Lib-User
CreateCommandBarItemsPerm	Begin AddinVer=21
Adding	Tool bars and combos
CreateCommandBarItemsPerm	End
Create command bar items	Begin
CreateCommandBarItems	Begin AddinVer=21
GetCommands	Commands2
Get Bar	Tools
Create Bar	Tools>Arduino
Adding	Tools>Ports
Adding	Tools>Programmers
Adding	Tools>Using Programmer
Adding	Tools>Burn Bootloader
Adding	ToolBar-Lib-Items
Adding	ToolBar-Lib-User
Added	ToolBar-Lib-Items
Adding	ToolBar-Board-Items
Adding	ToolBar-SerialPorts-Items
Create command bar items	End
 

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint