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 (5)

  1. Anonymous says:

    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.

  2. Anonymous says:

    Thank soooo much.. 😉

    it solve my problem.

  3. Anonymous says:

    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!!

  4. Anonymous says:

    Thank you! It helped me too.