VSIX Package doesn't include referenced project's dependencies

前端 未结 2 1399
暗喜
暗喜 2021-01-02 23:35

We have a visual studio package (VS Package) that references a class library project (Project A). Project A in turn references another class library project (Project B).

相关标签:
2条回答
  • 2021-01-02 23:51

    I had a similar problem: My VS Package project referenced another VS package project (~Project A) which in turn referenced a bunch of other projects (~Project B) containing the meat of our extension.

    Inspired by this answer: VSIX package doesn't include localized resources of referenced assembly, I added 'BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;GetCopyToOutputDirectoryItems;SatelliteDllsProjectOutputGroup' to the Output Groups Included in VSIX property of the reference from VS Package to Project A.

    This had the effect of dropping all the dependency DLLs in the ...\Debug\ folder for my VS Project, but they still didn't get included in the VSIX.

    Finally I went and added the BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;GetCopyToOutputDirectoryItems;SatelliteDllsProjectOutputGroup flags to all the references from my Project A to each of my Project Bs - then they all got included in the VSIX.

    (BTW this is with with Visual Studio 2013, but it doesn't seem to have change much since 2010)

    0 讨论(0)
  • 2021-01-02 23:59

    The simplest thing to do in this particular case is reference Project B from the VSPackage project and set the "Reference Output Assembly" property to False to avoid introducing a compile-time dependency.

    0 讨论(0)
提交回复
热议问题