0

目前我们通过以下方式引用另一个项目,以便将其完全包含在 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>

在我们将“旧”Nuget 引用转换为新的 PackageReference 格式之前,这一切正常。我们看到的是包引用的输出文件不再包含在 VSIX 包中。是否有一个额外的输出组可以包括在内来解决这个问题?

4

1 回答 1

0

可以通过将“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>
于 2021-10-20T12:39:36.830 回答