다음을 통해 공유


BUG: "Value does not fall within the expected range." error after installing VSTO 3.0 MSI package

If you are getting "There was an error during installation. Value does not fall within the expected range." error along with following exception:

************** Exception Text **************
System.ArgumentException: Value does not fall within the expected range.
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

and getting prompt as displayed below:

VSTO_MSI_ISSUE

Please make sure that, We are not using special character like "&" in the manufacturer property of the VSTO 3.0 Add-in MSI setup project.

In the above scenario we have Manufacturer Property value as “ABC & XYZ Inc” and we are getting exception as mentioned above when we start Outlook 2007 after installing add-in.

We can easily see from the snapshot that VSTO runtime is escaping "&" from the file path.

However, if we remove “&” from the Manufacturer Property value as “ABC XYZ Inc” add-in get installed and loaded as expected.

So, We should not use special character in the Manufacturer Property for VSTO 3.0 Add-ins MSI setup to workaround this bug.

Comments

  • Anonymous
    October 31, 2008
    PingBack from http://mstechnews.info/2008/10/bug-value-does-not-fall-within-the-expected-range-error-after-installing-vsto-30-msi-package/
  • Anonymous
    June 14, 2010
    I know this article is old but I just wanted to say thanks anyway.  I ran into this problem in VS2010 while trying to deploy an Outlook 2007 adding setup project.  Removing the '&' definitely fixes the issue.  I'm surprised that there is no mention of this limitation nor is there any validation for the field to let a person know that the value will cause problems.
  • Anonymous
    September 20, 2011
    Thank soooo much.. ;)it solve my problem.
  • Anonymous
    March 06, 2012
    Thanks a lot.Got the same Exception but with a different module:System.ArgumentException: Value does not fall within the expected range.  at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)  at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()I used an '&' in the install path like in the articel. Thanks for your help!!
  • Anonymous
    April 03, 2012
    Thank you! It helped me too.