vscode-csharp: Changing marketplace publisher from ms-vscode to ms-dotnettools causes extension recommendations to repeat ad nauseum

Steps to reproduce

  1. Have an old version of the extension installed that uses ms-vscode.csharp as the extension ID.
  2. Be upgraded to ms-dotnettools.csharp.
  3. Have a project that uses extension recommendations, set up to install the extension under the new ms-dotnettools.csharp

Expected behavior

Everything keeps working normally.

Actual behavior

Constantly keep being pestered with the need to install a not-yet-installed recommended extension, even though the extension is already installed.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 30
  • Comments: 31 (5 by maintainers)

Most upvoted comments

I’ve had to stop work and waste hours searching for a solution and finally happened on this thread. Not good as I’m self-employed. I don’t know where to start with “rolling back” things. Surely there was a more graceful way to have handled this change? Was it absolutely necessary to change publisher id?? Millions of devs use VSCode.

Same here. Instructions:

  1. uninstall c# extension (and disable any other extensions that are throwing errors because of c# not being “found”).

  2. Download csharp-1.21.12.vsix from here: https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.21.12

  3. Restart VS Code

  4. Open the Command Palette in VS Code. Search for “shell command install” and run that

  5. Open a command line terminal and go to the folder you downloaded the vsix file to

  6. Run: code --install-extension csharp-1.21.12.vsix

  7. Restart VS Code

  8. Open Preferences -> Settings in VS Code. Search for “update” and uncheck Extensions: Auto Update

Microsoft products are uniquely affected by Mercury Retrogrades.

Unfortunately, it also seems to prevent other extensions from loading:

publisher publisher2

Update regarding unity: https://github.com/Unity-Technologies/vscode-unity-debug/pull/152

Pull request is merged, so once the unity debugger extension is updated, this shouldn’t be an issue for folks using it. A lot of reports here came from that. Many other extensions have had PRs sent to them, but it will take time for them to incorporate those changes and publish updates. Since the name change is final (and changing it again would break things again), I think we’ll just have to close this out as by design. Sorry for the horrible inconvenience here. We’ll strive to do better and ensure something like this doesn’t happen again.

@rjgotten Sorry about that. There was a gap time between the publisher switch and we when we were able to publish a new build with the updated publisher id. We published a new release this morning so things should be back in a good state. Note you will likely see a suggestion to try the C# extension but that should go away with the next insiders release 3/6 and the next stable release 3/9.

The main takeaway is that it can be hard to coordinate a publisher change, new release of the C# extension, and new release of VS Code.

Thanks @zachstronaut , and I also didn’t do step 4, instead I downloaded the vsix package, and seached for “Install from VSIX” to run that.

I’ve had to stop work and waste hours searching for a solution and finally happened on this thread. Not good as I’m self-employed. I don’t know where to start with “rolling back” things. Surely there was a more graceful way to have handled this change? Was it absolutely necessary to change publisher id?? Millions of devs use VSCode.

Haha, whoops, I’m stupid. Re-opening.

I’ve got an update. I’ve verified that the latest stable and insiders releases, which are available now, no longer suggest installing the C# extension from the old publisher. However, extensions with dependencies on the C# extension still need to be republished specifying the new publisher.

Same problem /w Ubuntu 18.04

@videopilot you could try https://github.com/Unity-Technologies/vscode-unity-debug/pull/152 for a fix for unity and track https://github.com/Unity-Technologies/vscode-unity-debug/issues/153 for a related issue. I’ve made the change locally. I had rolled back to https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.21.12 for a bit this morning which also worked.

Your workaround does not work for me, @rjgotten, but my situation may be slightly different (perhaps we have different situations or encountered different repo states)

Steps To Reproduce:

  1. Open an existing workspace for which the “csharp” extension is “recommended”, that was created before the release of the latest extension version 1.21.13 (I have Azure Functions app workspaces that were built prior to March 5, 2020)
  2. Let VS Code update the csharp extension to the latest available version (automatic in my case, but could be manual for other users)

Expected behavior:

Everything keeps working normally.

Actual behavior:

VS Code still recommends the extension referencing the old publisher attribute and shows the following warning notification after the latest extension has been upgraded to v1.21.13:

The below 1 extension(s) in workspace recommendations have issues: ms-vscode.csharp (not found in marketplace)

* NOTE: In this case, Investigating %USERPROFILE%/.vscode/extensions/ms-dotnettools.csharp-1.21.13/package.json reveals that it already has the new publisher attribute (“publisher”: “ms-dotnettools”)

Workaround:

Because the existing workspace references the old publisher attribute value (“ms-vscode.csharp”), the only workaround I know of is to edit every such workspace in the following way:

  1. Edit each workspace’s extensions file: .vs-code\extensions.json
  2. Change the recommendation line from “ms-vscode.csharp” to “ms-dotnettools.csharp”
  3. Load/Reload the given workspace(s)
  4. Result: No more publisher mismatch for the recommended plugin, so no warning notification.

This really should not happen with such a broadly used and recommended extension 😦

Hope this helps some folks

NOTE

Issue can be worked around by

  1. going into the VSCode extensions folder (%USERPROFILE%/.vscode/extensions/ on Windows)
  2. opening the ms-dotnettools.csharp extension folder holding the locally installed extension.
  3. opening the package.json file.
  4. editing the publisher field to the ms-dotnettools value.

Moral of the story; Probably don’t just change the publisher on the marketplace without also correctly updating the package manifest?