Be careful when installing VS add-ins in localized Windows versions

When installing add-ins for Visual Studio, a number of different paths can be used. One of them is C:Documents and SettingsAll UsersApplication DataMicrosoftMSEnvSharedAddins – in a default installation of a US English Windows. Obviously a proper installer would use Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) to make sure the path is correct for the current system and for the current language. For example, for a German system the result would be C:Dokumente und EinstellungenAlle BenutzerAnwendungsdatenMicrosoftMSEnvSharedAddins.

Now, the funny thing is that a part of the path is stored by Visual Studio verbatim. To be precise, VS stores the path as %ALLUSERSPROFILE%Application DataMicrosoftMSEnvSharedAddins, as you can see in VS using Tools/Options/Add-in/Macros Security.

Obviously they forgot that the Application Data part wouldn’t be called that in a localized version of Windows. So if you want to install your add-in into that path, you should make sure you fiddle around with it to create a mixed-language version, which fits the template used in the VS settings.

2 Comments on Be careful when installing VS add-ins in localized Windows versions

  1. Because of things like that, I’m running the English version of Windows, even though I’m from Germany too. They usually get it right, but sometimes you run into an oversight like this an then you are screwed. Patches and tools are also usually released for the English version first and some tools never get localized.Stefan

    Like

  2. Probably a good idea, but we can’t depend on all our customers to do the same thing šŸ™‚

    Like

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s