03. 将pdb调试文件包含到.vsix包中

vs插件如何把pdb文件打包进去,方便记录日志和调试

<PropertyGroup>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>  
    <IncludeAssemblyInVSIXContainer>true</IncludeAssemblyInVSIXContainer>
    <IncludeDebugSymbolsInVSIXContainer>true</IncludeDebugSymbolsInVSIXContainer>
    <IncludeDebugSymbolsInLocalVSIXDeployment>true</IncludeDebugSymbolsInLocalVSIXDeployment>
  </PropertyGroup>
  <Target Name="_ResolveCopyLocalNuGetPackagePdbs" 
          Condition="$(CopyLocalLockFileAssemblies) == true" 
          AfterTargets="ResolveReferences"
          BeforeTargets="GetVsixSourceItems">
    <ItemGroup>
      <VSIXCopyLocalReferenceSourceItem 
        Include="@(ReferenceCopyLocalPaths->'%(RootDir)%(Directory)%(Filename).pdb')" 
        Condition="Exists('%(RootDir)%(Directory)%(Filename).pdb')" />
    </ItemGroup>
  </Target>

参考地址:

https://stackoverflow.com/questions/51099731/how-to-include-referenced-nuget-debugging-symbols-pdbs-into-vsix-package

https://stackoverflow.com/questions/19007964/how-to-include-debugging-symbols-to-vsix-package

posted @ 2019-05-10 10:24  王树羽  阅读(398)  评论(0编辑  收藏  举报