Microsoft not so recently added support for publishing Visual Studio extensions to the marketplace via a command line interface called
It’s no coincidence they tweeted me upon releasing the feature, as I’d been pestering them for a very long time to make it happen.
The walk-through I linked to will get you going, but might not get you all the way there. If you run into trouble trying to get it to work, here’s a reference implementation that might help:
I have an appveyor build that runs automatically, anytime someone pushes code to the master branch. Here’s how I configured the build to version, package, and publish the vsix to the marketplace.
This gets called as part of the “Before build script”. It sets the version number inside the vsix manifest based on the appveyor build number.
This gets called as part of the “After deployment script” within my deployment. It’s the thing that actually pushes the built vsix to the marketplace. Note that I’ve configured my deployment to only fire when someone pushes to the master branch.
The trickiest part about the file is that it uses an environment variable to obtain the personal access token, since I don’t want to commit that to source control:
You can set the environment variable in appveyor here:
The MS article shows how to create the personal access token.
Standard file, almost completely copied from the MS documentation. Be careful to get the “internalName” right. I wish I knew more about how the internal name relates to the vsix identifier, as my lack of knowledge actually caused me to lose access to my plugin on the marketplace. Be careful…whatever that means.
This is just my vsix manifest for reference. You might even find it helpful to review the entire repo.
Last, but not least, the end result: https://marketplace.visualstudio.com/items?itemName=thealexdresko.HomeSeerTemplates2
I hope that helps someone who wants to get started using
vsixpublisher. let me know if you have any questions, and I’ll try to help.