How to expand the project properties screen in Visual Studio?

When u looks at project properties in Visual Studio and get several tabs.

The standard ones are Application, Build, Build Events, etc.

You can also add custom tabs. For example, look at the properties of a WebApplication or VSIX project, you will get different (additional) tabs.

So how do I write a VSIX add that adds a custom tab to the project properties windows?

+5
source share
1 answer

Check out this article: How to add and remove property pages .

You create a page like this:

class DeployPropertyPage : Form, Microsoft.VisualStudio.OLE.Interop.IPropertyPage
{
    . . . . 
    //Summary: Return a stucture describing your property page.
    public void GetPageInfo(Microsoft.VisualStudio.OLE.Interop.PROPPAGEINFO[] pPageInfo)
    {
        PROPPAGEINFO info = new PROPPAGEINFO();
        info.cb = (uint)Marshal.SizeOf(typeof(PROPPAGEINFO));
        info.dwHelpContext = 0;
        info.pszDocString = null;
        info.pszHelpFile = null;
        info.pszTitle = "Deployment";  //Assign tab name
        info.SIZE.cx = this.Size.Width;
        info.SIZE.cy = this.Size.Height;
        if (pPageInfo != null && pPageInfo.Length > 0)
            pPageInfo[0] = info;
    }
}

:

[MSVSIP.ProvideObject(typeof(DeployPropertyPage), RegisterUsing = RegistrationMethod.CodeBase)]
+3

All Articles