locked
Add-In: .vsct files and VSCTCompile in 2012? RRS feed

  • Question

  • I've got a VS 2010 add-in that I want to get working on VS 2012. I installed the VS 2012 SDK, made a new .vsix project and started porting the files over.

    The menu options the add-in was supposed to add weren't showing up, and I figured this was probably because I had not set the VSCTCompile on my .vsct file. However it doesn't seem to recognize that build action in VS 2012.

    Do you still use .vsct files to specify menu item locations in VS 2012? If so, how can I get the correct build action set on it?
    Tuesday, August 28, 2012 4:50 PM

Answers

  • >I've got a VS 2010 add-in that I want to get working on VS 2012.

    By AddIn I assume you mean Package (there is an extensbility mechanism called an AddIn but it doesn't support VSCT command declerations).

    >I installed the VS 2012 SDK, made a new .vsix project and started porting the files over.

    How exactly?  Did you use the VSIX project under say C#->Extensbility?  That is (imho) a useless project unless you are extremely experienced in VS development and know how to set up everything manually, which most people do not know how to do and overlooking things is very easy. You want to use Templates->Other Project Types->Extensibility->Visual Studio Package.

    >Do you still use .vsct files to specify menu item locations in VS 2012?

    Yes, VSCT is still used. I would suggest using the Wizard to create a new package project and going from there, or, if you insist on the 'empty vsix' option use it as a baseline to diff what it is doing that your empty project isn't.

    Though I do have to ask, why not just load the 2010 project in 2012? It will upgrade (so if you want to keep the 2010 version you can fork it) everything to 2012 and you don't have to manually set everything up.

    Tuesday, August 28, 2012 5:24 PM

All replies

  • >I've got a VS 2010 add-in that I want to get working on VS 2012.

    By AddIn I assume you mean Package (there is an extensbility mechanism called an AddIn but it doesn't support VSCT command declerations).

    >I installed the VS 2012 SDK, made a new .vsix project and started porting the files over.

    How exactly?  Did you use the VSIX project under say C#->Extensbility?  That is (imho) a useless project unless you are extremely experienced in VS development and know how to set up everything manually, which most people do not know how to do and overlooking things is very easy. You want to use Templates->Other Project Types->Extensibility->Visual Studio Package.

    >Do you still use .vsct files to specify menu item locations in VS 2012?

    Yes, VSCT is still used. I would suggest using the Wizard to create a new package project and going from there, or, if you insist on the 'empty vsix' option use it as a baseline to diff what it is doing that your empty project isn't.

    Though I do have to ask, why not just load the 2010 project in 2012? It will upgrade (so if you want to keep the 2010 version you can fork it) everything to 2012 and you don't have to manually set everything up.

    Tuesday, August 28, 2012 5:24 PM
  • Thanks for the tips. Yeah I must have done the C# -> Extensibility as I ended up having to track down a bunch of DLLs to add references to. I tried opening my old project in VS 2012 but it didn't upgrade the manifest file and ended up opening it as an XML file with no designer.

    The Visual Studio Package template was exactly what I was looking for.

    Tuesday, August 28, 2012 5:45 PM
  • Yeah, the VSIX format changed between 2010 and 2012 and doesn't upgrade (why? I don't know). You could just manually upgrade it by looking at a default generated one and making your old one look like it, but that is kind of gross :)

    Ryan

    Tuesday, August 28, 2012 6:00 PM