locked
VS2012 Error: The target "VSIXContainerProjectOutputGroup" does not exist in the project. RRS feed

  • Question

  • I'm using VS2012, and VS2012 SDK.

    I created a new Visual Studio Package project from the template. The options i've filled in for the template were minimal (none of the checkboxes was checked). 

    I've added another project in the solution as a 'Dependency' for the outputted .vsix. That project's compiled dll is to be embedded inside the .vsix. I've added the Dependency using the 'source.extension.vsixmanifest' designer, and the relevant part in the auto-generated file looks like:


    <Dependencies>
        <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="4.5" />
        <Dependency Id="Microsoft.VisualStudio.MPF.11.0" DisplayName="Visual Studio MPF 11.0" d:Source="Installed" Version="11.0" />
        <Dependency d:Source="Project" d:ProjectName="ConsoleApplication1" DisplayName="|ConsoleApplication1;VSIXContainerProjectOutputGroup|" Id="|ConsoleApplication1;VSIXContainerProjectOutputGroup|" d:InstallSource="Embed" Location="|ConsoleApplication1;VSIXContainerProjectOutputGroup|" />
    </Dependencies>

    Also, it changed the project (the .csproj file) to have the following ItemGroup:

    <ItemGroup> <ProjectReference Include="..\ConsoleApplication1\ConsoleApplication1.csproj"> <Project>{96B3ED83-97E0-4A61-BB33-3030E1C500FD}</Project> <Name>ConsoleApplication1</Name> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> <IncludeOutputGroupsInVSIX>VSIXContainerProjectOutputGroup%3b</IncludeOutputGroupsInVSIX> </ProjectReference> </ItemGroup>

    All this is nice and well, however, when I attempt to build the package project, Visual Studio gives me the following error message:

             The target "VSIXContainerProjectOutputGroup" does not exist in the project. 

    I've 'repaired' VS2012 SDK in hoping that this will solve the problem, but alas, following build-attempts resulted with the same error.

    I've looked at the end of the project's xml (.csproj file) and the following targets were inside:

    <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
    <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />  

    Does anyone know how to solve this issue?

    Thanks in advance.

    Addition: More over, I've looked inside "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\VSSDK\Microsoft.VsSDK.targets" and i've found the following entry:

      <!--
        ============================================================
                 VSIXContainerProjectOutputGroup
                 
          Used for determining the VSIX Container that this project
          builds from other projects that reference it.
        ============================================================
        -->
      <Target Name="VSIXContainerProjectOutputGroup"
              Outputs="@(VSIXContainerOutputGroupOutput)"
              DependsOnTargets="$(VSIXContainerProjectOutputGroupDependsOn)">

        <ItemGroup Condition="'$(CreateVsixContainer)'=='true'">
          <_VSIXContainerOutputGroupOutput Include="$(TargetVsixContainer)" />
        </ItemGroup>

        <ItemGroup Condition="'$(CreateVsixContainer)'=='true'">
          <VSIXContainerOutputGroupOutput Include="@(_VSIXContainerOutputGroupOutput->'%(FullPath)')" />
        </ItemGroup>
      </Target>

      <PropertyGroup>
        <VSIXNameProjectOutputGroupDependsOn>$(VSIXIdentifierProjectOutputGroupDependsOn);FindSourceVsixManifest</VSIXNameProjectOutputGroupDependsOn>
      </PropertyGroup>

    This baffles me even more - That .targets file is referenced (imported) by my package project, and that target does exist. What could be problem?!



    • Edited by EZSlaver Thursday, September 26, 2013 1:25 AM
    Thursday, September 26, 2013 12:38 AM

Answers

  • I finally solved it. what I did is I added the following line to the end of the project to be included inside the package:

    <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />  

    That project was created before the installation of VS2012 SDK, so this line was not included upon the creation of the project.

    Cheers.

    • Marked as answer by EZSlaver Saturday, September 28, 2013 6:54 PM
    Saturday, September 28, 2013 6:54 PM

All replies

  • Hi,

    Please try to modify some settings:

    • Click the reference for the internal project, and then, in the Properties window, set the Output Groups Included in VSIX property to BuiltProjectOutputGroup.Because by default in a multi-project solution, if a project that outputs to a VSIX package includes a reference to another project in the same solution, it includes the dependencies of that project.
    • If you want to include satellite DLLs from referenced assemblies in the VSIX package, add SatelliteDllsProjectOutputGroup to the Output Groups Included in VSIX property.

    Then,please try to do a full rebuild in Visual Studio to see if it works.

    For more information, please refer to VSIX Deployment-Dependency Handling .

    Here are some related topics below:

    VSIX package doesn't include localized resources of referenced assembly

    VS 2010 mouse processor extension - not working

    In addition, you can use the MSBuild Command-Line such as /verbosity:diagnostic to get detailed log messages from the Command Prompt and then share them with us here for further analysis if necessary .

    Best Regards,

    Jane.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, September 27, 2013 2:56 AM
  • I finally solved it. what I did is I added the following line to the end of the project to be included inside the package:

    <Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />  

    That project was created before the installation of VS2012 SDK, so this line was not included upon the creation of the project.

    Cheers.

    • Marked as answer by EZSlaver Saturday, September 28, 2013 6:54 PM
    Saturday, September 28, 2013 6:54 PM
  • I feel glad to hear that you have solved this issue.

    And thank you for sharing your solution here.

    Have a nice day.

    Jane.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, September 30, 2013 4:46 AM