not correctly run

Developer
Jan 22, 2009 at 8:35 AM
Edited Jan 22, 2009 at 8:36 AM
1. it does not show up in the tools menu for non-english versions of visual studio, I could see the localization is in the resx file, but result is null;

2. the increment behavior is odd, sometimes it only updates assembly version, sometimes only file version, and for most of the time, none, even source files are changed.
Coordinator
Jan 22, 2009 at 8:45 AM
1. it does not show up in the tools menu for non-english versions of visual studio, I could see the localization is in the resx file, but result is null;

I don't have access to a non-english version of visual studio, so I can't test this. But it sounds quite odd; the code that selects the menu is the default visual studio will generate with the "Create an Add-in" wizard. Maybe someone can shine a light on this. (Are others also having this problem?)

2. the increment behavior is odd, sometimes it only updates assembly version, sometimes only file version, and for most of the time, none, even source files are changed.
Please post the project file and the file containing the attributes so I can take a look into this. Note that the build number is time based, so if less then a minute has passed nothing will be updated.
Developer
Jan 22, 2009 at 8:54 AM
2. oh... I don't know that, I click build repeatly :)  can the 1 min behavior be customized?
Developer
Jan 22, 2009 at 8:57 AM
by the way, what does the checkbox for nodes use for? I checked the nodes, press ok, open the settings dialog again, the checked states are gone.
Coordinator
Jan 22, 2009 at 9:18 AM
2. oh... I don't know that, I click build repeatly :)  can the 1 min behavior be customized?

XTobr39 made a request for that here. So yeah, somewhere in the future :)

by the way, what does the checkbox for nodes use for? I checked the nodes, press ok, open the settings dialog again, the checked states are gone.

I've no idea, shouldn't be there :) ... Seems these slipped into the beta release. I'll upload a new beta.
Coordinator
Jan 22, 2009 at 10:01 AM
Uploaded a new beta release that shouldn't contain the checkboxes.

By the way for that issue with non-english versions of visual studio: could you try the following?

Close all running versions of Visual Studio.
Start Visual Studio (devenv.exe) from the commandline with the following argument /resetaddin BuildVersionIncrement.Connect

For example: 

"C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe" /resetaddin BuildVersionIncrement.Connect
or if you're running Visual Studio 2008
"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /resetaddin BuildVersionIncrement.Connect

This will notify the plugin to recreate the menu entry.
Developer
Jan 23, 2009 at 8:02 AM
Edited Jan 23, 2009 at 8:17 AM
I know what happened, I am using Chinese Simplified version of vs, the code you use to determine the resource name is not fully correct.

you use:
cultureInfo.TwoLetterISOLanguageName

it will work for other countries, but for Chinese, there are a few variants, simplified, traditional, etc. and in the CommandBar.resx, it is NOT TwoLetterISOLanguageName, it is full name.

that is, it's currently "zh-CHSTools", it should work if it is "zhTools".

but, it will not work for other versions like Chinese Traditional. so I think that you might need to modified you logic to handle culture name, changing to full name will work, and, even for full name, the cultureInfo.Name, it is "zh-CN", NOT "zh-CHS".

to sum up:
zh-CHS->zh-CN
zh-CHT->zh-TW
Coordinator
Jan 23, 2009 at 8:47 AM

//If you would like to move the command to a different menu, change the word "Tools" to the
//  English version of the menu. This code will take the culture, append on the name of the menu
//  then add the command to that menu. You can find a list of all the top-level menus in the file
//  CommandBar.resx.

ResourceManager resourceManager = new ResourceManager("BuildVersionIncrement.CommandBar", Assembly.GetExecutingAssembly());
CultureInfo cultureInfo = new System.Globalization.CultureInfo(_applicationObject.LocaleID);
string resourceName = String.Concat(cultureInfo.TwoLetterISOLanguageName, "Tools");
toolsMenuName = resourceManager.GetString(resourceName);
This piece of code is what visual studio generates when you create a new AddIn. Could you check if yours differ from the above? (if you create an addin on that version of vs). If it is different combine the two and upload the source code (added your userid to the project team). Thing is ... I can't test if it works (because I don't have a Chinese version of VS) and I'm away for about a week.

Cheers.
Developer
Jan 23, 2009 at 11:48 AM
Edited Jan 23, 2009 at 11:56 AM
mmmm, the resx file is exactly the same as yours, and my code is identical to yours.

very strange, no one find out the BUG for the last 4 years! it will definitely not work for all chinese versions of visual studio 2005! maybe none of our chinese ever develop add-in for visual studio......

btw, I don't know whether it's related to the system configuration, I am using windows 2003 server simplified chinese version. maybe it will be different in other versions like vista/2008.

and it seemed that the "zh-CHS" and "zh-CHT" were introduced lately, they were "zh-CN" and "zh-TW" respectively for the last 20 years.

to sum up: I recommend that you just modify the resx file, replace all "zh-CHS" to be "zh-CN", and "zh-CHT" to "zh-TW", it will work. I will test other windows versions later, hopefully tomorrow, after tomorrow, I will have 7 days leave because of Chinese lunar new year:)

after I test all windows versions, I will give you the result.
Jan 26, 2009 at 5:14 PM
hello,
i've just installed your plugin int the french version of VS2008 and i got the following error when i click on "tools "/"build version increment setting" :

---------------------------
Error
---------------------------
Error occored while building solution tree.
System.NotImplementedException: La méthode ou l'opération n'est pas implémentée.

   à EnvDTE.Project.get_FileName()

   à BuildVersionIncrement.SolutionItem..ctor(Project project, Boolean recursive)

   à BuildVersionIncrement.SolutionItem.FillSolutionTree(SolutionItem solutionItem, Projects projects)

   à BuildVersionIncrement.SolutionItem..ctor(Solution solution, Boolean recursive)

   à BuildVersionIncrement.AddInSettings.BuildTree()
---------------------------
OK  
---------------------------

Jan 26, 2009 at 9:25 PM
On a french version of VS2008, updating assembly version and file version together doesn't work fine : only assembly version is updated. But when only is selected file version, the update does work. And I don't see in the source the reason of a such behavior. 

[

assembly: AssemblyVersion("2.0.41207.2350")]
[
assembly: AssemblyFileVersion("2.0.41207.2354")]

 

 

 

 

 

Developer
Mar 2, 2009 at 2:00 AM
Hi,

    sorry to answer you so late. I have been too busy working on the most important task of my life, so I nearly forgot to test the add-in on other systems.

    now I have tested on the Simplified Chinese version of xp/2003/vista and 2008, all shows that the name of current cultureInfo is "zh-CN".
Developer
Mar 2, 2009 at 2:24 AM
I've updated the CommandBar.resx file, adding the support for zh-CN and zh-TW

and, please use cultureInfo.Name, rather than cultureInfo.TwoLetterISOLanguageName

http://files.cnblogs.com/unruledboy/CommandBar.zip
Coordinator
Mar 3, 2009 at 9:26 PM
Ok ... I will look into it as soon as I have the time :)