5

I am having trouble installing Visual Studion 2010 extension:

Install Error : System.IO.PathTooLongException: C:\Users\felix.DOMAIN\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Vendor\Vendor 2011 Developer Tools\1.0\ProjectTemplates\CSharp\XYZ\1033\Vendor.XyzDeveloperTools.XyzPackageProject.zip

I install the extension by double-clicking .vsix files; so I don't have an option to shorten Vendor 2011 Developer Tools into, say VendorTools. Is there any other (more manual) way to install the extension?

By the way, the total length is 199 characters; I thought it is way less than 248 chars limit. I use Win7 64-bit if it makes a difference

Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
Felix
  • 9,248
  • 10
  • 57
  • 89

4 Answers4

2

If you get the error while trying to install the add-in, the only one solution I've tried that worked is taken from this resource, thanks to Pedro Rainho:

You should try this:

  1. Close all instances of Visual Studio 2010.
  2. Go to C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE, or where you have installed your Visual Studio 2010.
  3. Locate and edit the file devenv.pkgdef in a text editor, like notepad.
  4. Your file should contain something like this:

[$Initialization$] "ApplicationExtensionsFolder" = "$RootFolder$\Common7\IDE\Extensions" "PkgDefSearchPath" = "$ApplicationExtensionsFolder$;$RootFolder$\Common7\IDE\CommonExtensions;$RootFolder$\Common7\IDE\devenv.admin.pkgdef;" "UserExtensionsRootFolder" = "$AppDataLocalFolder$\Extensions" "RegistryRoot" = "Software\Microsoft\VisualStudio\10.0"

This File contains the locations of VSIX instalations. You should edit UserExtensionsRootFolder And specify a new folder. Ex:

Change this:

"UserExtensionsRootFolder"    = "$AppDataLocalFolder$\Extensions"

To this:

"UserExtensionsRootFolder"    = "C:\Extensions"

5- Save the file and install the extension. Now all your VSIX extensions will be installed to C:\Extensions

NOTE: I'm using a Vistual Studio 2010 Ultimate with Windows XP 64 bits. Of course "C:\Extensions" it is just an example.

Luis Quijada
  • 2,345
  • 1
  • 26
  • 31
  • 1
    but...if you have previously installed other extensions they will not show up in Visual Studio. I changed the file path, installed the extension, then copied it back to the old and too long extension folder and changed the filepath in devenv.pkgdef back to it's original setting. – kevinskio Nov 11 '12 at 17:11
  • 1
    Your Answare helped me, I use Windows 2003 and Visual Studio 2010. – Tarek El-Mallah Nov 22 '13 at 19:41
1

From codeplex

  1. take the vsix file, open with zip or rar, extract to a convenient location, open the extracted folder,
  2. open the extension manifest with notepad, add some short name inside the name tag E.g. <Name>V</Name>
  3. zip the complete folder, rename the zip file extension to vsix
  4. click on vsix and execute.
amol n
  • 71
  • 1
  • 1
0

I am getting total length = 193, not 199 - either way it shouldn't throw that exception.

Anyways, have a look at

How to avoid System.IO.PathTooLongException

Community
  • 1
  • 1
VoodooChild
  • 9,776
  • 8
  • 66
  • 99
  • I looked at it before I posted... the problem with that post (besides the fact that it links to another post that doesn't exist) is that it describes how to copy a file to a long directory *in my code*. However, I don't have control over that copying! Also, I think the **long** directory name comes from blah/blah/project.zip : project.vstemplate which makes it 259 characters. – Felix Jan 24 '11 at 03:38
  • 1
    What I think would be possible is to unzip the file, and somehow install the extension from inside VS2010... but I don't see "browse" button in the extension manager – Felix Jan 24 '11 at 03:39
0

It's weird error and started getting this when ever I install a new extension.

Try the following command as an administrator after closing all Visual Studio instances.

devenv.exe /InstallVSTemplates

It may happen again if you install a new extension. If so, then run the above command again.

Siva
  • 543
  • 4
  • 6