DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Languages
  4. Distribute Visual Studio Templates With Extensions Installer

Distribute Visual Studio Templates With Extensions Installer

In the article, we talk about how you can distribute the project/item templates you created among your peers.

Anton Angelov user avatar by
Anton Angelov
·
Oct. 05, 18 · Tutorial
Like (1)
Save
Tweet
Share
8.77K Views

Join the DZone community and get the full member experience.

Join For Free

History

While working on the Bellatrix project, we wanted to find ways to solve all 40+ problems in the best possible way. There were a couple of things that we had to address — distribute the getting-started projects (the so-called starter-kits) across all platforms and give people a fast way to create new Bellatrix test projects.

So, we used three different solutions for test project creation — Visual Studio project templates, .NET Core templates, and custom-made cross-platform templates. One of the ways for deploying the Bellatrix item and project templates was through Visual Studio extensions installers. Here I am going to share with you how you can use them too.

Create VSIX Project Template

Prerequisites

To find the VSIX project template, you must install the Visual Studio SDK.

1. Click Tools > Get Tools and Features...

Get Tools and Features Menu Visual Studio

2. From the Visual Studio Installer, install Visual Studio extension development

Visual Studio Installer VS extension development feature

Create VSIX Project

1. Open New Project wizard

2. Create new empty VSIX project

Create Empty VSIX Project

3. Create a desired item or project templates

For more information on how to speed up tests writing, check the last four articles in the series:

Standardize Page Objects with Visual Studio Item Templates

Create Multiple Files Page Objects with Visual Studio Item Templates

Speed up Automated Tests Writing with Visual Studio Project Templates

Speed up Automated Tests Writing with .NET Core Project Templates

The item and project templates are zip files.

4. Copy templates' zip files to the new project directory

5. Set Copy to Output Directory build action to Copy Always

Copy to Output Set to Copy Always

6. Open source.extension.vsixmanifest file

7. Populate the information about the installer

Populate VSIX installer information

8. Add the template's zip to Assets based on the type of the template.

Choose Type Assets VSIX

8.1. In our case, we choose Microsoft.VisualStudio.ProjectTemplate, but you can pick a type for item template or snippet.

8.2. For the source, browse to the file that we added to the project.

Template File Path VSIX Installer

9. Set prerequisites for the VSIX installer, which version of Visual Studio will be supported. By default, the latest two versions are set.

VSIX Prerequisites

10. Build your project

InstallVSIX Extension

After you build your project, a new *.vsix file is generated in the bin folder. You double click on it, and the template will be installed on your machine.

Install VSIX Extension

You need to close all instances of Visual Studio or the installation will happen on the next restart of the tool.

After the extension is installed, you can create a new project from the extracted template.

Create Project from Installed VSIX Project Template

Uninstall VSIX Extension

From Tool -> Extensions and Updates you can find all installed VSIX extensions. From there you can uninstall the extension.

Uninstall VSIX extension

Summary

In the article, we talked about how you can distribute the project/item templates you created among your peers. It is a convenient way to speed up tests writing and applying common team's coding/quality standards.

Template Installer (macOS) .NET

Published at DZone with permission of Anton Angelov, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Connecting Your Devs' Work to the Business
  • Web Application Architecture: The Latest Guide
  • Artificial Intelligence in Drug Discovery
  • Handling Automatic ID Generation in PostgreSQL With Node.js and Sequelize

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: