Visual Studio extension migration to 2022

Kazys Račkauskas 1 Reputation point
2022-03-26T15:51:50.16+00:00

I have trouble moving my VS extension to support 2022 version. I'm following instructions in https://learn.microsoft.com/en-us/visualstudio/extensibility/migration/update-visual-studio-extension?view=vs-2022 and use Shared Project. But when I add reference to shared project it stop working. I can reproduce it by creating empty VSIX project, and adding command. When I run debug I can see new item in Tools menu. If I create Shared Project and just add reference to VSIX project command is not seen in menu anymore (I run Reset The Visual Studio 2022 Experimental Instance). And in Event log I can see errors:

The description for Event ID 0 from source VSTTExecution cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

(devenv.exe, PID 41388, Thread 1) TestTypes{7a24f8ff-85da-d664-ef44-83ff4743dae6} could not be loaded because the TIP could not be instantiated for the following reason(s): An item with the same key has already been added.

The system cannot find the file specified

I'm using Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.1.2

This drives me crazy. I would really appreciate if you could say what should I do.

Regards
Kazys

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,250 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Kazys Račkauskas 1 Reputation point
    2022-03-29T07:09:55.837+00:00

    Hello, did the Repair, but didn't help.
    So here is what I do:

    • Create VSIX project, added command
      List item
    • Run the project. I can see new item in Tools menu
      187749-command-seen.png
    • Moved files to shared project + shared folder according to instructions in https://learn.microsoft.com/en-us/visualstudio/extensibility/migration/update-visual-studio-extension?view=vs-2022
      187753-with-shared-project.png
    • Run the project. Command is not seen in Tools menu anymore:
      187831-command-missing.png
    • It shows that extensions is installed:
      187822-extention-is-installed.png
    • not error logs at this moment in Event Viewer
    • I run "Reset The Visual Studio 2022 Experimental Instance"
    • Run the project again. No menu item is seen. And in extension manager it doesn't show that item is installed
      187728-extention-is-not-installed.png
    • Now in event viewer I can see errors:
      187803-event-viewer.png
      text in all four errors differs only by:
    • (devenv.exe, PID 8944, Thread 1) TestTypes{7a24f8ff-85da-d664-ef44-83ff4743dae6}
    • (devenv.exe, PID 8944, Thread 1) TestTypes{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}
    • (devenv.exe, PID 33068, Thread 1) TestTypes{7a24f8ff-85da-d664-ef44-83ff4743dae6}
    • (devenv.exe, PID 33068, Thread 1) TestTypes{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}
    • Also debugger symbols are not loaded:
      187778-debugger.png

    I'm not able to attach sample project.

    0 comments No comments

  2. Frank Hileman 1 Reputation point
    2022-04-20T00:51:07.567+00:00

    I suggest you share files in a project, but not the projects themselves. Trying to reuse extensibility projects across Visual Studio versions has never worked well for me. I also use conditional compilation.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.