The "GetDeploymentPathFromVsixManifest" task failed unexpectedly
Asked Answered
D

6

19

After installation of visual studio 2017 getting his error for VSIX projects ... any suggestion to resolve the issue?enter image description here

Severity    Code    Description Project File    Line    Suppression State
Error       The "GetDeploymentPathFromVsixManifest" task failed unexpectedly.
System.Runtime.InteropServices.COMException (0x80070005): ExternalSettingsManager::GetScopePaths failed to initialize PkgDefManager for C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe
   at Microsoft.VisualStudio.Settings.ExternalSettingsManager.GetScopePaths(String applicationPath, String suffixOrName, String vsVersion, Boolean isLogged, Boolean isForIsolatedApplication)
   at Microsoft.VisualStudio.Settings.ExternalSettingsManager.CreateForApplication(String applicationPath)
   at Microsoft.VsSDK.Build.Tasks.ExtensionManagerUtilities.GetSettingsManagerForDevenv(String rootSuffix)
   at Microsoft.VsSDK.Build.Tasks.GetDeploymentPathFromVsixManifest.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() MasterData  
Duane answered 23/3, 2017 at 19:40 Comment(3)
Suddenly I began to receive the same error on the project that was compiled the day beforeAcquisition
I scan c:\Users for directories named 15.0_<somestuff>Exp and remove it.That helped. how long?!Acquisition
The issue appeared on devops build agent and an update of Microsoft.VSSDK.BuildTools package from 17.0.xxx to 17.4.2118 fixed the problem.Regality
A
10

This error appeared for me randomly without doing any change in the code. It disappeared after removing the following folders:

C:\Users\\AppData\Local\Microsoft\VisualStudio\15.0_765fd02aExp C:\Users\\AppData\Roaming\Microsoft\VisualStudio\15.0_765fd02aExp

After it I am able to build again without error.

To find the folders I recommend to use some file search application and use the string "15.0_Exp*".

Annemarie answered 18/4, 2017 at 15:9 Comment(1)
I would recommend following the directions in this answer instead: https://mcmap.net/q/643201/-the-quot-getdeploymentpathfromvsixmanifest-quot-task-failed-unexpectedlyOctad
S
6

Hopefully someone else can get a better workaround. but for now this is what I got working:

  1. Uncheck the "Deploy VSIX content to experimental" in the VSIX tab of your project properties. (this will allow you to build the project)
  2. Follow this migration guide. in my case, all I had to do was adding my environment to the supported list. the rest seems more relevant if you are ready to publish.
  3. Install the generated extension manually from the target output directory. if it doesn't work, delete the content of the output directory and rebuild.

This will let you resume working on the extension, but unfortunately you won't have any debugging support. and you will have to uninstall/install every time you want to test something.

Saxton answered 10/4, 2017 at 14:26 Comment(2)
The main problem is it does not help on debugDuane
try the migration guide as well. updating the Microsoft.VSSDK.BuildTools solved the problem completely for me.Saxton
C
2

I got the same build error while trying to upgrade a VSIX package from VS 2015 to VS 2017. I was able to reproduce the same issue by creating a new empty VSIX project template and adding a new class via the Visual Studio Package template.

The VSIX project does not have any references by default, however, Visual Studio 2017 will automatically add references to all required Nuget packages when adding the Package class.

I was able to resolve the issue without unchecking the "Deploy VSIX content to experimental instance for debugging" option by downgrading the Nuget package for Microsoft.VSSDK.BuildTools from version 15.1.192 to version 15.0.26201.

I am using Visual Studio 2017 Enterprise version 15.3.0.

Carnap answered 6/9, 2017 at 15:15 Comment(1)
This also resolved the issue for mePulp
U
2

I also got this error after upgrading to VS2019 16.9. I made it work by manually resetting the VS experimental instance.

  1. Copy the following %localappdata%\Microsoft\VisualStudio\ into the search area of the Start Menu and hit enter. When the folder opens, you will see a folder that ends in Exp. You'll need that name for the last command.
  2. Open an admin instance of Powershell, or the Visual Studio Developer Command prompt.
  3. Type cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\{VSEdition}\VSSDK\VisualStudioIntegration\Tools\Bin", where {VSEdition} should be replaced with Community, Professional, Enterprise, or Preview, depending on which is installed on your machine.
  4. Reset experimental instance with CreateExpInstance /Reset /VSInstance=16.0 /RootSuffix={ExperimentalFolderName}, where {ExperimentalFolderName} is replaced with the folder name we got in Step 1 (not the full path, just the name).

Hope that helps!

Unfolded answered 12/3, 2021 at 8:28 Comment(0)
B
0

I noticed that my build errors were related to an XML Serialization issue. That made me think it was related to some messed up XML in the manifest, so...

  • The Fix Open the source.extension.vsixmanifest file with a text editor. Make sure that there are no XML Errors. Use the Schema Reference to make sure everything is where it shoudl be.

  • The Issue My file had the <Tag /> XML element nested in the <Description /> XML Element which is not legal. I moved the <Tag /> Element to the outside after looking at the

Bors answered 5/2, 2018 at 18:38 Comment(0)
W
0

I got this error because I had the solution open in two different instances of Visual Studio :(

Wilinski answered 18/6, 2020 at 20:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.