When trying to install the VSIX template in VS 2010, I am receiving a Install Error : System.IO.PathTooLongException. Once it takes my default extension folder and adds "\Laurent Bugnion (GalaSoft)\MVVM Light Toolkit Templates\4.0.23.0\ItemTemplates\Silverlight for Windows Phone\Mvvm\MvvmViewModelLocator.WP7.zip", it is too long to install. Is there any way to have a shorter path or a way around this issue.
Thanks in advance
I had the same problem when installing Cosmopolitan template.
Rename .vsix file to .zip.
Open it and there's a file extension.vsixmanifest, open it in Notepad or other editor.
Find node <Name>Some very long name of the extension</Name> and make it short <Name>Short name</Name>
Save, close. Rename .zip to .vsix and now it should install without an error.
Related
Aptana studio 3 won't finish installing because it can't download the node.js msi file. I went and downloaded it separately, but that didn't help.
The Aptana installer creates a folder in "User name/AppData/Roaming/Appcelerator".
The folder is named "Aptana Studio 3.6.0".
In Appcelerator, create a new folder named "Aptana Studio" (without the quotation marks.)
Re-run the installer.
If it creates the node.js msi file in a subfolder, double click on it and it will install the node.
Re-run the installer. It should automatically download and install the prerequisites folder and files, including Git.
Aptana then correctly completes the install.
It appears the key to solving the install problem is creating the correct name for the install folder in "User name/AppData/Roaming/Appcelerator"
When I checked in the directory, the "Aptana Studio" folder was already there. I ended up following this thread's solution instead, and it worked.
Also, my apologies for asking an existing question: my search prior to asking came up empty, even though it should have found it. Not sure why not, though...
I'm trying to add a package to my project using NuGet (in VS2015). When I click the "Install" button I see
Downloading missing packages...
at the top of the screen with a progress bar.
After a moment the message is replaced with -
An error occurred while trying to restore packages: Central Directory corrupt.
with a "Restore" button at the end which does the same process.
Anyone have any idea how to fix this?
Edit 07/2017
A far easier method of solving this issue is be to just get Visual Studio to re-download the package -
In Visual Studio open Tools -> Options.
Select NuGet Package Manager.
Ensure both Allow NuGet to download missing packages and Automatically check for missing packages during build in Visual Studio are both ticked.
Click OK.
In a file explorer window navigate into the projects' "packages" folder.
Three options -
Figure out which package is at fault as described in the original answer and delete it's folder.
Move all the packages to a temporary location if you're unsure whether they're all still available in NuGet (you'll need to copy the missing ones back afterwards)
Delete all the package folders if you are sure all your packages are still available in NuGet.
Back in Visual Studio build your solution.
Visual Studio should download all your packages.
Original Answer
Ok, the problem here was that the .nupkg file for one package (found in project root/packges/package folder) had been corrupted at some point and had a size of zero.
I figured out which package was corrupt after attempting to manually install a random package using the package manager console -
Install-Package *package name*
which told me that there was a problem with a currently installed package -
Install-Package : An error occurred while retrieving package metadata for 'package name'....
From there I was able to fix it by doing the following -
Navigate to the to the NuGet site
Search for the project using the search facility at the top of the page
Download the .nupkg file using the "Download" link on the left hand side (checking the version number).
Copy the downloaded file over the old one in the "packages" folder.
Remove all nuget packages under \packages\ ( i had multiple corrupted packages)
Go to your solution in Visual Studio and press "Restore Nuget Packages"
Rebuild your solution
Should be fixed :)
1.First of all read the error.
2.Find the Directory listed on error console.
1.File Explorer ==>>
For Example, My Path is.
C:\Code\Ex_Nikesh\20\packages
In Packages Find Microsoft.SqlServer.Types.xx.xxx.xx.xx(xx indicates version number)
3.Inside the folder find Microsoft.SqlServer.Types.xx.xxx.xx.xx.nu(Nuget Package File [In My case file size is 0 KB])
Delete that File.
4.Now Download the File and Paste inside Microsoft.SqlServer.Types.xx.xxx.xx.xx Folder
Click Here for Download Nuget File
My problem was a corrupted zip file in the following folder:
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages
I cleared all these packages (offline repository)
After building Bootstrap v4-alpha with npm, Visual Studio can no longer open my project, because the file paths are too long. It just hangs.
Bower installs bootstrap here:
C:\Users\BigFont\Documents\GitHub\2015-113MH\webapp\src\webapp\wwwroot\lib\bootstrap
That's fine. The problem arises after building bootstrap with npm. After deleting the bootstrap directory, Visual Studio can open the project, but I do not want to delete the directory.
How can we use Visual Studio with long path names?
Edit
My current workaround is to use Visual Studio Code, because it can handle long file paths.
I have resorted to creating folders at the root of my C:\ drive. I also use 7zip to delete folders to get around the 'file path too long' errors. You can open 7zip, click on the folder you want to delete and hit the Shift+Del keys.
NPM 2.0 creates nested folders that are very deep. Consider upgrading to NPM 3.0 as this fixes this problem and tries to create a folder structure that is as flat as possible.
If you are using Visual Studio 2015 RTM, it comes with NPM 2.0. NPM 3.0 will not be released with VS until the next update. You can still install NPM 3.0 but it is a little more involved. See this blog post for a step by step guide to install.
I've both VS 2012 and VS 2013 installed on my computer. The problem is that when I download an VSIX-File and open it with the Visual Studio version selector the file gets opened by VS but instead of installing it. VS opens the file as if it was an unknown binary format.
The attached image shows how VSIX-files are opened (happens with every file ... this is just an example):
I faced the same issue. Just use the VSIXInstaller to install the extension.
You can open "Developer Command Prompt for VS2012" tool in Start -> Microsoft Visual Studio 2012 -> Visual Studio Tools. On the console, run the below command:
VSIXInstaller <path to vsix file>
Open "Developer Command Prompt for VS2015" as administrator.
Type VSIXInstaller.exe vsixFilePath
Note that this way wouldn't work with me and gives me "Path to vsix file 'G:\Roslyn' is invaild or you don't have required access permissions". To solve this you need to put the path in a double quote like this:
VSIXInstaller.exe "G:\Roslyn SDK.vsix"
I got into a weird situation where in a fresh install of W10 and VS2015 Community, the Player Framework vsix installation won't start, either by dbl click or from command prompt using VSIxInstaller.exe, and would show no message at all. The solution was to open an elevated command prompt (run Developer Command Prompt for VS2015 as administrator) and then type VSIXInstaller.exe worked.
I am not clear whether you want to install or just view the contents of VSIX. If you want to install the extension, you just need to double click it and it will install (Do not try to open it with VS Version selector). If you want to see what is inside VSIX, it is basically an archive. So either try to use program like 7-zip to open it else, rename .vsix to .zip and then unzip it.
Further, there is also a chance that you have wrongly associated vsix files to be opened with Visual Studio. In such a case it will open in Visual Studio any case.
Finally, if you have wrongly associated the vsix to open with Visual Studio, try installing the extension using VSIXInstaller.exe found in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\VSIXInstaller.exe
To add to the other answers, if the VSIX files either doesn't have an associated program to open with or opens with the wrong application, selecting the VSIXInstaller.exe as the associated commands re-enables the ability to double-click and directly install it (without the need to do it via commandline).
I faced a similar issue when I first installed VS 2017. This is what worked for me.
Resolution:
Restart VS 2017.(I hadn't restarted it before installation)
Install it from Tools->Extension & Updates.Search for "Perforce" and install.
I double clicked on this and it installed just fine.
Couldn't do it on VS2013 through the extensions dialog.
for me the problem was the extension InstallerProjects was on network server so I had to copy it to my machine (local) and it worked
I've got a Visual Studio Setup Project that uses the msiexec.exe file to create an Uninstall item as outlined in >> THIS << article on SO.
The Installer does not run.
When I launch the installer by double-clicking the setup.exe file, the "Please wait while setup launches" screen barely blips on the screen before I am confronted with my error.
The Text is (for search functions):
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2727.
I have found a set of MSI Error Codes, and Error Code 2727 translates to
The directory entry '[2]' does not exist in the Directory table.
Could someone guide me towards fixing this? What should I do?
[UPDATE]
At the suggestion of Cosmin Pirvu, I have created an error log for my installer. After looking it over, it appears my installation error could be the result of having a link to the Not Installed file msiexec.exe that I use in conjunction with my Project's [ProductCode] to create an Uninstall link.
The log file shown below appears to indicate that my installation fails when the installer attempts to create a temporary file for msiexec.exe, then it has another failure when it tries to display the Error Icon.
The file >> install.log on Google Sites << is my Error Log file's output (Hint: just do a search for Return value 3 to get to the errors).
[UPDATE 2]
I have an Uninstall link in the setup project that links back to the batch file uninstall.bat in my main project:
#echo off
%windir%\system32\msiexec.exe /x %1
The Arguments to the Uninstall link is only [ProductCode], since the /x switch is hard coded into the batch file.
[Solution]:
The Visual Studio Installer was not creating a folder that had some required DLLs in it.
The first step should be creating an installation log to see what triggers the error.
From the log you posted, it seems like your MSI tries to use a directory which is not in Directory table. Are you using any merge modules or special custom actions? If so, try to determine if they try to use a directory from your package.
You mentioned something about an uninstall shortcut. Can you give us more details?
Old question, I know - just wanted to add in some information that helped me with the Windows Installer project in Visual Studio 2015, in case anyone comes across this topic.
I got the same error message, 2727. My issue was that I was including my source code into an "src" folder in the installation directory. When looking at the output files for the source, I noticed several files like this:
\obj\Release\\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
Yes, it included that extra slash after Release. I had to add an exclusion (right click Source Files output -> ExcludeFilter) to exclude these files from installing. I added "*Temporary*" to exclude only these files.
Maybe someone else can explain why these temporary files were generated, all I know is that this fixed the issue. Hopefully this will help someone else looking for this topic.
I know its a Old question, but like #Riccaforte I was having some trouble to fix this in Visual Studio 2015. What I did was just delete all my Source Files inside my Aplication Folder, and I don't know why, but it did the trick.
If you remove a directory or directories from the Directory Table, This will cause an issue with other tables still using those directory variables.
My 2727 error message was the result of a *.png file I had added as a link to my project. "Copy to Output Directory" was set to "Copy if newer". Somehow the Visual Studio Setup Project was not able to resolve the path to the *.png file and added an invalid path to the installer.
LessMSI helped to find the problem https://lessmsi.activescott.com/ and removing the link in the project and adding the files in the installer project solved the problem.
Hope someone finds this helpful
regards