How to publish VS project templates to Github and Visual Studio Marketplace
In this page I want to describe procedure to publish your projects to anybody. A number of trap will be overcome to publish, for example need to add optional comment in unexpected place and this same comment will be show to end-user. Other two big trap with the name of project, name will be short and without special chars. Third trap is desktop.ini, I usually mark folder by special icon, but this simple convenient future will make using the project impossible by end-users. Even to create simple publication to Github you need be accuracy, need to use last version of Github and publish instruction in Gighub is stupid and wrong.
This five most widespread trouble you can see in screen below.
Usually I have no time to overcome that issues and simple publishing important part of code to my own domain by one click and by own tools and my own tags system inside my blog.
Also Microsoft a big scammer, and I have no wish to game with scammers in scammer places, for example is it real to download some MS Library 254 millions times? There are no so many programmers in the whole world.
And usually I install for my customer my own Git of SVN servers, for example see my ancient article from 2011 year Избавляемся от Team Foundation Server - ставим Subversion, but below I will publish how to follow Microsoft rules.
Publish to Github
- 1. Install last version of git bash, usually old version git bush generate error 400.
- 2. Create repository in Github.
- 3. Perform GitExtension and git bash
- 4. Navigate in git bash in right directory and git recommended to init repository by Git init. This is not enough, because first commit is mandatory. Usually I make it by GitExtension.
- 5. Next step has right description in Github, need to bing remote server to local repository. Usually it doing in git bash be command remote add origin https://github.com/xxx
- 6. Last step is PUSH, but in github placed wrong command to pushing. After binding need to use git push origin master without key -u
Publish to Visual Studio Marketplace
- 1. First step is separate one project to individual solution, because usually we use in Clean Architecture - many folders and many projects in one solution. In my case I want to split one project from big solution and upload this common test stub to Visual Studio Marketplace.
- 2. Next step is create project template. Need to set right namespace and description.
- 3. Next step is most important. Need to unpack project template and manually add tag in my screen below. This description will be categorize template for end-user and marketplace. Than need to zip project template again.
- 4. Next step is create VSIX project.
- 5. Next step is place ZIP-file with project template inside VSIX project and include it to project.
- 6. Next step is tune VSIX project. In my case most important tune is Metadata and Asset.
- 7. And as last step of VSIX need to build VSIX project. I’m generally unlucky and I spent a lot of time to this step and I must been rewrite all Microsoft VB code manually.
- 8. Next operation need to do in Msrketplace. Need to register and uploading VSIX file. In uploading process I'm was be unlucky again and I was be faced with number of issues, for example in publishing name is forbid blank character (why?) and than this stupid Microsoft site is forced me to restrict my template name by length (why?) and so on. But finally my template will be approved and I mark it as publish.
- 9. And need check your uploaded template. As usually in this step I was be unlucky again, because my projects was be composed with desktop.ini.