2

What to do to solve "The “GetDeploymentPathFromVsixManifest” task failed unexpectedly" when trying to debug a VS extension project??

Same question was already asked multiple times with different source reasons, all for VS2017 usually for upgrading VS extensions from VS2015, and it should have been solved with VS 2019. Yet, it just popped up.

The "GetDeploymentPathFromVsixManifest" task failed unexpectedly.
System.TypeLoadException: Method 'get_JoinableTaskFactory' in type 'Microsoft.VisualStudio.Sdk.BuildTasks.ExtensionEngineHost' from assembly 'Microsoft.VisualStudio.Sdk.BuildTasks.16.0, Version=16.9.2017.12405, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation.
   at Microsoft.VisualStudio.Sdk.BuildTasks.ExtensionManagerUtilities.GetExtensionEngine(ISettingsManager manager, Boolean deletePendingUninstalls)
   at Microsoft.VisualStudio.Sdk.BuildTasks.GetDeploymentPathFromVsixManifest.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()  

I have tried all the solution for the same error found on SO, so far to no avail. I am using VS 2019 Community 16.9.2, updated all packages, downgraded some to try, nothing really changes this error.

This is my first attempt on VSIX and I just downloaded an existing project from github and compiled it. The github project is working (probably) since the extension is available on the marketplace.

Any other suggestions? Searches on this error in combination with the JoinableTaskFactory dont return exactly many results.

Jack J Jun
  • 5,633
  • 1
  • 9
  • 27
Hefaistos68
  • 381
  • 3
  • 9
  • Have you tried updating to the latest NuGet package for both `Microsoft.VSSDK.BuildTools` and `Microsoft.VisualStudio.SDK`? There are some cases when the error will disappear if you update these packages to the latest version (it solved mine). Refer: https://github.com/microsoft/VSSDK-Extensibility-Samples/issues/116 – theo May 28 '21 at 08:14
  • Yes, updated, downgraded, all the same. – Hefaistos68 May 30 '21 at 18:28
  • 1
    If your problem still persists, are you targeting a certain version of Visual Studio? If not, I have avoided this error by upgrading my Visual Studio version to the latest version `16.10`. The `VisualStudio.SDK` version is `16.10.31321.278` and the `VSSDK.BuildTools` version is `17.0.1597`. – theo May 30 '21 at 23:19

2 Answers2

3

For me the solution was to do at least one of the following steps:

  1. Delete the obj-folder in the project
  2. Execute Reset the Visual Studio 2019 Experimental Instance. You can find this tool when you search it in the windows search bar.
  3. Clean and Rebuild the project

Sometimes it helped if I did only one step and sometimes it only worked after doing all the steps.

I couldn't find out if there is a specific pattern behind, but doing all of the above steps always fixed the error for me.

Another issue where I got the same error was if there was the wrong external program selected under Project Properties -> Debug -> Start external Program. For VS2019 I need to select C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe If I switched between Visual Studio Versions, then sometimes a different Visual Studio version was selected.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Berni
  • 41
  • 7
1

Uncheck: "Deploy VSIX content to experimental instance for debugging" in solution properties->VSIX

Also Update installed NuGet packages.

Screenshot showing highlighted VSIX project option for "Deploy VSIX content to experimental instance for debugging".

patridge
  • 26,385
  • 18
  • 89
  • 135