GithubHelp home page GithubHelp logo

vsixsynchronizer's Introduction

VSIX Syncronizer

Build status

Provides the ability to generate code-behind files for .vsixmanfiest and .vsct files in managed code to make the information easy to consume from the rest of the extension.

Download this extension from the Open VSIX Gallery.


To enable the synchronization of .vsct and/or .vsixmanifest files, simply right-click the file in Solution Explorer and hit Synchronize To Code File.

Context menu

This will set the Custom Tool property on the file as shown here in the Property Grid:

Property Grid

It will apply the VsctGenerator for .vsct files and VsixManifestGenerator to .vsixmanifest files.

A code-behind file is then being generated and kept up-to-date with any changes to the .vsct or .vsixmanifest files.

Code Behind

Generated code-behind files

The code being generated are C# classes that compiles like regular C# files into your project. Here's examples of what those classes would look like:

.vsct files

// ------------------------------------------------------------------------------
// <auto-generated>
//     This file was generated by VSIX Syncronizer
// </auto-generated>
// ------------------------------------------------------------------------------
namespace VsixSynchronizer
{
    using System;
    
    /// <summary>
    /// Helper class that exposes all GUIDs used across VS Package.
    /// </summary>
    internal sealed partial class PackageGuids
    {
        public const string guidPackageString = "8c737258-7da1-4314-97e9-cb61f7cf8d22";
        public static Guid guidPackage = new Guid(guidPackageString);

        public const string guidUIContextString = "f19443c0-4f6b-45c3-bea5-80c1f8a538dd";
        public static Guid guidUIContext = new Guid(guidUIContextString);

        public const string guidVsixSynchronizerCmdSetString = "c6562423-a610-432a-8efa-ca46df10ddd6";
        public static Guid guidVsixSynchronizerCmdSet = new Guid(guidVsixSynchronizerCmdSetString);
    }
    /// <summary>
    /// Helper class that encapsulates all CommandIDs uses across VS Package.
    /// </summary>
    internal sealed partial class PackageIds
    {
        public const int ToggleVsctSyncId = 0x0200;
    }
}

.vsixmanifest files

// ------------------------------------------------------------------------------
// <auto-generated>
//     This file was generated by VSIX Syncronizer
// </auto-generated>
// ------------------------------------------------------------------------------
namespace VsixSynchronizer
{
    internal sealed partial class Vsix
    {
        public const string Id = "d7834c28-6a0f-4b5a-b3e0-735dc78cd439";
        public const string Name = "VSIX Synchronizer";
        public const string Description = @"Provides the ability to generate code-behind files for .vsixmanfiest and .vsct files in managed code to make the information easy to consume from the rest of the extension.";
        public const string Language = "en-US";
        public const string Version = "1.0";
        public const string Author = "Mads Kristensen";
        public const string Tags = "vsix, vssdk";
    }
}

Now you can consume those GUIDs and IDs from the .vsct files and the metadata about your extension from the .vsixmanifest files.

License

Apache 2.0

vsixsynchronizer's People

Contributors

madskristensen avatar ikkentim avatar ben-hamida avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.