Q:

Visual Studio extension custom command error: "Object does not match target type"

I want to create a Visual Studio extension. More precisely an additional menu item. I used this tutorial as a guideline:
Visual Studio Extensibility: Creating Visual Studio VSIX package extension
The problem is after I created successfully a VSIX project, I tried to add a custom command. While the custom command is added to my project the following error occurs:

After pressing "ok" a .cs file is added to my project. This file has few  reference errors. I also tried to reference the source file by myself, but without success.

It also gives the following output:

Adding a new custom command 'Command1' to the project 'MockGenExtension':
    The custom command requires a VS package. No existing VS packages found in the project. A new VS package 'Command1Package' will be created for the custom command.

I already reinstalled the Visual Studio and the SDK without any effect.

A:

An Upgrade to Visual Studio 2017 fixed the problem for me.

