Building and then installing a VSI add-in yields "one or more content items contained within the .vscontent"

515 Views Asked by At

I have an existing project, which creates a VSI as the output. The project works nicely for Visual Studio versions 2005, 2008, and 2010.

I want to add support for Visual Studio 2013.

I created a new install folder VS2013 and put copies of the .AddIn and .vscontent from 2010 into it.

According to this page, the ContentVersion number for Visual Studio 2013, should stay the same, namely 2.0. That page has a bug, because the dropdown at the top specifically references 2013, however the text for "Text Value" only goes up to 2012 with a value of 2.0. I changed the version number for Visual Studio in the .AddIn module to 12.0, and then build. I ran into the following error:

one or more content items contained within the .vscontent cannot be installed because the correct version of the content installer component cannot be found.

Is there some other file to modify? The source of the two modules are below.

.vscontent
<?xml version="1.0" encoding="utf-8" ?>
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
  <Content>
    <FileName>BuildVersionIncrement.Addin</FileName>
    <FileName>BuildVersionIncrement.dll</FileName>
    <DisplayName>Build Version Increment Addin</DisplayName>
    <Description>Auto increments the build number of all projects of current solution.</Description>
    <FileContentType>Addin</FileContentType>
    <ContentVersion>2.0</ContentVersion>
  </Content>
</VSContent>

.AddIn
<?xml version="1.0" encoding="UTF-16" standalone="no"?>
<Extensibility xmlns="http://schemas.microsoft.com/AutomationExtensibility">
    <HostApplication>
        <Name>Microsoft Visual Studio</Name>
        <Version>12.0</Version>
    </HostApplication>
    <Addin>
        <FriendlyName>BuildVersionIncrement</FriendlyName>
        <Description>Auto increments the build version of .net projects.</Description>
        <Assembly>BuildVersionIncrement.dll</Assembly>
        <FullClassName>BuildVersionIncrement.Connect</FullClassName>
        <LoadBehavior>5</LoadBehavior>
        <CommandPreload>1</CommandPreload>
        <CommandLineSafe>1</CommandLineSafe>
    </Addin>
</Extensibility>
1

There are 1 best solutions below

0
On

The simple answer is that the above code for VS2013 will not work. Visual Studio 2013 and above use a new format called VSPackage. :-(