VSIX - 包括 PackageReference 输出组

VSIX - Include PackageReference output groups

目前我们通过以下方式引用另一个项目,以便将其完整包含在VSIX包中。

    <ProjectReference Include="....csproj">
      <Project>{8da36305-5468-465a-bf37-d87936b776d2}</Project>
      <Name>ProjectName</Name>
      <VSIXSubPath>SubDirectory</VSIXSubPath>
      <IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bDocumentationProjectOutputGroup%3b</IncludeOutputGroupsInVSIX>
      <IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>
    </ProjectReference>

在我们将 'old' Nuget 引用转换为新的 PackageReference 格式之前,它工作得很好。我们看到的是包引用的输出文件不再包含在 VSIX 包中。有没有我们可以包含的额外输出组来解决这个问题?

可以通过将“ReferenceCopyLocalPathsOutputGroup”添加到 IncludeOutputGroupsInVSIX 来解决。 在这里找到它:https://github.com/dotnet/msbuild/issues/3069

<ProjectReference Include="....csproj">
  <Project>{8da36305-5468-465a-bf37-d87936b776d2}</Project>
  <Name>ProjectName</Name>
  <VSIXSubPath>SubDirectory</VSIXSubPath>
  <IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bBuiltProjectOutputGroupDependencies%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup%3bDocumentationProjectOutputGroup%3bReferenceCopyLocalPathsOutputGroup%3b</IncludeOutputGroupsInVSIX>
  <IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup%3b</IncludeOutputGroupsInVSIXLocalOnly>
</ProjectReference>