Error "Value does not fall within the expected range" on non english Visual Studio


If you try to use the wspbuilder VS addin menu on a non english version of visual studio an error "Value does not fall within the expected range" (in french : "la valeur n'est pas comprise dans la plage attendue") occur.
After setting logging level to "verbose" in the configuration file, i saw that this error came from the property "BuildWindow" of the class "DTEHandler". Here, the name of the Build output panel is hard coded "Build". On a french installation this panel's name is "Générer".
To workaround this problem, i added an output panel named "Buid" thanks to the folowing macro :

Sub AjoutPanneauBuid()
    ' Create a tool window handle for the Output window.
    Dim win As Window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput)
    ' Create handles to the Output window and its panes.
    Dim OW As OutputWindow = win.Object
    Dim OWp As OutputWindowPane
    ' Add a new pane to the Output window.
    OWp = OW.OutputWindowPanes.Add("Build")
    ' Add a line of text to the new pane.
    OWp.OutputString("Nouveau panneau")
End Sub
The error message doesn't appear anymore.

file attachments


writetosat wrote Dec 11, 2008 at 9:39 AM

I think with this, you are stopping showing up error. ..
I got the sam error and found that, if you create a project not of WSPBuilder and try to add a feature then it pops up error. If you delete the project, create a new project and select template "WSPBuilder" then add a feature.. all will be fine.
the difference i think is , the folder 12 will be missing in a non WSPBuilder project and WSPBuilder throws up the error. the other differences are solutionid.txt and the strongkey

h0ly0ne wrote Feb 12, 2009 at 7:57 AM

Original Poster is correct, all VS2008 (SP1) Versions that are in a different language (German/French/etc.) are getting
this error if there is no "BUILD" Output Window available in VS2008.
Naturally in localized Versions of VS2008 this Window is named differently -> "Erstellen" in German and "Générer" in French.
The code example postet above is a possible workaround, but hopefully there will be a new version that fixes this
localization problem.

greetings from austria

wrote Feb 12, 2009 at 7:58 AM

kaneboy wrote Feb 25, 2009 at 2:29 AM

I made a patch for this issue, replace "WSPTools.VisualStudio.VSAddIn.dll" in GAC with the attached version. It should works.

wrote Feb 25, 2009 at 2:29 AM

UlrichA wrote Mar 25, 2009 at 2:51 PM

I installed version 1.04 and the problem, in my case a german visual studio 2008, still exists. After replace the 'WSPTools.VisualStudio.VSAddIn.dll" like described by kaneboy, everything is fine.
Is this issue already assigned to the release plan?

wrote Nov 16, 2011 at 12:01 PM

Rockie wrote Nov 16, 2011 at 12:03 PM

Thank You very much!

Replace helped! Cheers!

wrote Feb 22, 2013 at 12:14 AM