locked
Visual C++ Build Tools 2017 extension support missing assemblies RRS feed

  • Question

  • I installed the Visual Studio Build Tools 2017 (Version 15.9.17). I then selected the following workflows:

    * Visual C++ build tools
    * .Net desktop build tools
    * Visual Studio extension development

    However, when I attempt to build my Visual Studio extension using these tools, I see several warnings about missing assemblies, such as:

    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Shell.Framework, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [VSPlugin.csproj]

    Some of the other assemblies that the build warns are missing are:

    * Microsoft.VisualStudio.OLE.Interop
    * Microsoft.VisualStudio.Shell.15.0
    * Microsoft.VisualStudio.Shell.Framework
    * Microsoft.VisualStudio.Shell.Immutable.10.0
    * Microsoft.VisualStudio.Shell.Interop
    * Microsoft.VisualStudio.Shell.Interop.8.0
    * Microsoft.VisualStudio.Shell.Interop.9.0
    * Microsoft.VisualStudio.Shell.Interop.10.0
    * Microsoft.VisualStudio.VCProject
    * Microsoft.VisualStudio.VCProjectEngine

    The build then exits with a code of 1, causing a failure.

    As I understand it, these assemblies should be located in:

    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\PublicAssemblies

    However there is only one file in that directory: Microsoft.VSSDK.TestHostFramework.dll

    Why were these assemblies not installed as part of the Visual Studio extension development workflow, and how do I install them?


    • Edited by chris_t_w Wednesday, October 16, 2019 9:04 AM
    Wednesday, October 16, 2019 9:00 AM

Answers

  • Hi chris_t_w,

    Thank you for sharing.

    After research, the "Visual Studio C++ core feature" is IDE features for supporting Visual C++, which is default installed with Visual studio installation, and "Microsoft.VisualStudio.VCproject"&"Microsoft.VisualStudio.VCProjectEngine" are interfaces for some C++ project features in IDE environment, so it should be necessary.

    In addition, the workload "Visual C++ build tools" are just to configure build environment, and the C++ related option which is in the workload "Visual Studio extension development", is also to do the same.

    At last, I appreciate that you could share your solution here, which would be beneficial to other community members with similar issue. 

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by chris_t_w Friday, October 18, 2019 7:54 AM
    Thursday, October 17, 2019 10:09 AM

All replies

  • If I open the installer, select "Individual components" and install the "NuGet package manager" component, most of the assemblies are now available in the PublicAssemblies directory. Why would this be?

    Even after this, I'm still missing the following:

    * Microsoft.VisualStudio.VCProject

    * Microsoft.VisualStudio.VCProjectEngine

    And I'm still getting these warnings in addition:

    warning MSB3283: Cannot find wrapper assembly for type library "EnvDTE". Verify that (1) the COM component is registered correctly and (2) your target platform is the same as the bitness of the COM component.

    warning MSB3283: Cannot find wrapper assembly for type library "Microsoft.VisualStudio.CommandBars". Verify that (1) the COM component is registered correctly and (2) your target platform is the same as the bitness of the COM component.


    • Edited by chris_t_w Wednesday, October 16, 2019 9:07 AM
    Wednesday, October 16, 2019 9:07 AM
  • Hi chris_t_w,

    Welcome to MSDN forum.

    According to your description, it seems that the related packages are not restored in your project. You could open build tools, and locate to your project path, then run "msbuild -restore" to automatically restore all nuget packages for your project.

    After that, if it throws the below error

    It is mainly caused by that the generated VSIX output file will be deployed to the folder for extensions of the experimental VS instance, which is a required step to debug the VSIX file. So you need to open Microsoft.VsSDK.targets file it mentioned, then change "DeployExtension" section to false.

    <DeployExtension Condition="'$(DeployExtension)' == ''">false</DeployExtension>

    Any feedback will be expected.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, October 17, 2019 5:50 AM
  • Hi Dylan,

    We're not using nuget, but I think I figured out how to get it working.

    When I added the "Visual Studio C++ core features" component from the Visual Studio Build tools installer, the missing assemblies were installed into the "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\PublicAssemblies" directory and I was then able to successfully build the extension.

    Does this make sense?

    Thursday, October 17, 2019 9:09 AM
  • Hi chris_t_w,

    Thank you for sharing.

    After research, the "Visual Studio C++ core feature" is IDE features for supporting Visual C++, which is default installed with Visual studio installation, and "Microsoft.VisualStudio.VCproject"&"Microsoft.VisualStudio.VCProjectEngine" are interfaces for some C++ project features in IDE environment, so it should be necessary.

    In addition, the workload "Visual C++ build tools" are just to configure build environment, and the C++ related option which is in the workload "Visual Studio extension development", is also to do the same.

    At last, I appreciate that you could share your solution here, which would be beneficial to other community members with similar issue. 

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Marked as answer by chris_t_w Friday, October 18, 2019 7:54 AM
    Thursday, October 17, 2019 10:09 AM