PathTooLongException when I install Visual Studio extension
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
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:
- Close all instances of Visual Studio 2010.
- Go to C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE, or where you have installed your Visual Studio 2010.
- Locate and edit the file devenv.pkgdef in a text editor, like notepad.
- 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.
From codeplex
- take the vsix file, open with zip or rar, extract to a convenient location, open the extracted folder,
- open the extension manifest with notepad, add some short name inside the name tag
E.g. <Name>V</Name>
- zip the complete folder, rename the zip file extension to vsix
- click on vsix and execute.
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
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.
精彩评论