microsoft / vsmarketplace

Customer feedback and issue tracker repository for Visual Studio Marketplace
MIT License
39 stars 10 forks source link

need more categories support for VsixPublisher.exe when publish vsix to marketplace.visualstudio.com #459

Open ali50m opened 2 years ago

ali50m commented 2 years ago

Describe the bug I am trying to upload a Visual Studio theme to Visual Studio extension Marketplace, with VsixPublisher.exe command line, as documented in walkthrough-publishing-a-visual-studio-extension-via-command-line . However, when filling in the publishmanifest.json as requirement, I found there is no relevant "Theme" categories for this json file, it will be reported as "Encountered an unsupported category". But "Theme" is a avaiable category in Visual Studio extension Marketplace site. I guess this might be a new category which VsixPublisher.exe doesn`t know.

To Reproduce Here is a example of publishmanifest.json.

 {
   "$schema": "http://json.schemastore.org/vsix-publish",
   "categories": [
     "Themes"
   ],
   "identity": {
     "internalName": "name"
   },
   "overview": "overview.md",
   "priceCategory": "free",
   "publisher": "xxx",
   "private": false,
   "qna": false,
   "repo": "https://github.com/xxx/repo"
 }

Expected behavior Publish the vsix under "Themes" category with VsixPublisher.exe successfully.

Additional context https://docs.microsoft.com/en-us/answers/questions/966637/need-more-categories-support-for-vsixpublisherexe.html?childToView=971788#comment-971788

SaiKanth007 commented 1 year ago

Themes is a subcategory under tools, can you please try with 'tools_theme' as a category ?

SaiKanth007 commented 1 year ago

I just looked into the http://[json.schemastore.org/vsix-publish](http://json.schemastore.org/vsix-publish) and see that themes category is missing here and that might be the reason for the issue you are facing. I will check with the team on this and update.

For now, to unblock you can try marketplace portal to create the extension (https://marketplace.visualstudio.com/manage/{yourPublisherName})

ali50m commented 1 year ago

I have already published my vs theme through the marketplace portal. It would be much nicer if this issue can be fixed for the cli tool, then the new version can be published through CI/CD.

SaiKanth007 commented 1 year ago

I checked with VSIDE team, it seems the Category was wrong in the .json file, it should be “theme” instead of Themes.

For example: "categories": [ "theme" ],

ali50m commented 1 year ago

I tried the following publishManifest.json, but still got error with the publish command.

"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" publish -personalAccessToken *** -payload MyDarkTheme\bin\Release\MyDarkTheme.vsix -publishManifest MyDarkTheme\publishManifest.json
{
  "$schema": "http://json.schemastore.org/vsix-publish",
  "categories": [
    "theme"
  ],
  "identity": {
    "internalName": "mydarktheme"
  },
  "overview": "overview.md",
  "priceCategory": "free",
  "publisher": "ali50m",
  "private": false,
  "qna": false,
  "repo": "https://github.com/ali50m/MyDarkTheme"
}

The error says like below. Looks like the caterogy "theme" does not exist.

VSSDK: error VsixPub0029 : An error occurred while communicating with the marketplace: categories: Requested categories does not exist.

Is it a tool side (e.g. VsixPublisher.exe) issue?

SaiKanth007 commented 1 year ago

Yes, this is related to VsixPublisher.exe