Search code examples
c#visual-studiovsix

Why is something looking for VsixUtil.exe here?


I have a solution that's a VS extension, that compiles to a VSIX. I deleted my packages folder, built the solution, and I get an error... The specified task executable location "D:\git\QueryFirst\packages\Microsoft.VSSDK.BuildTools.15.0.26201\tools\VSSDK\bin\VsixUtil.exe" is invalid.

The folder exists, but sure enough VsixUtil.exe is not in it. I installed VsixUtil with nuget, but it doesn't go to that location. Why is my solution looking for VsixUtil in that location. Can I point it somewhere else? Or install it there?

I'm on VS 2017 Enterprise.


Solution

  • The VsixUtil.exe utility should not be downloaded/installed separately. The NuGet package that you have used to download is not "official" from Microsoft or VisualStudioExtensibility.

    Apparently there is a version mismatch in your project between two VSSDKs:

    • the project is using a recent Microsoft.VsSDK.targets file that uses the VsixUtil task:
      <UsingTask TaskName="VsixUtil" AssemblyFile="$(VsSDKAssemblyFile)" />
    
    • but it is going to the folder of an old VSSDK (Microsoft.VSSDK.BuildTools.15.0.26201) that doesn't have the VsixUtil.exe file required for that task.

    Upgrade your Microsoft.VSSDK.BuildTools NuGet package of your project to use the latest versions 15.8.x ( 15.8.3252 or 15.8.3247) that do include VsixUtil.exe in the folder tools\vssdk\bin.