使用< DebugType> Full< / DebugType>有什么区别?和< DebugType> Portable< / DebugType> .net核心项目? [英] What is the difference between using <DebugType>Full</DebugType> and <DebugType>Portable</DebugType> for .net core projects?

查看:336
本文介绍了使用< DebugType> Full< / DebugType>有什么区别?和< DebugType> Portable< / DebugType> .net核心项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要生成打开的封面报告,我必须将debugType设置为Full。我在生成服务器上生成报告,因为如果覆盖率未达到特定阈值,则必须使生成失败。
构建在发布模式下生成。
将csproj文件中的debugType保持为完整有什么后果?会降低生产性能吗?

To generate open cover report I have to make debugType as Full. I generate report on build server as I have to fail the build if the coverage doesn't reach a certain threshold. The build is generated in Release mode. What consequence does keeping debugType Full in my csproj file have? Will it degrade the performance in production?

推荐答案

区别在于完整类型会发出经典的Windows PDB符号文件,是复杂的,文献记载很差。 便携式 PDB格式是一种新的开源格式,可以在所有平台上创建和使用。您可以在它在dotnet /核心回购

The difference is that the "full" type emits a classic windows PDB symbol file which is complex and poorly documented. The "portable" PDB format is a new open-source format that can be created and used on all platforms. You can read more information on this format at it's documentation on the dotnet/core repo.

与是否可以调试应用程序无关,而是与支持新格式和经典格式的工具无关。因此,没有任何运行时后果(当您随应用程序一起交付可移植的pdb文件并希望查看行号映射时,.NET Framework< 4.7.1中的打印堆栈跟踪除外)。

It has nothing to do with whether or not the application can be debugged, but rather the tools that support the new vs classic format. So there aren't any runtime consequences (except for printing stack traces in .NET Framework < 4.7.1 when you ship portable pdb files with the application and want to see line number mapping).

因此,在更新工具以使用新格式之前,您需要将 DebugType 属性更改为 Full code>如果需要使用尚不支持新格式的工具,该工具现在是基于SDK项目的默认格式。

So until tools are updated to work with the new format, you'll need to change the DebugType property to Full if you need to use tooling which does not yet support the new format which is now the default for "SDK-based" projects.

对于调试版本,您希望csproj包含类似

To only do that for debug builds, you'll want your csproj to contain a section like

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
  <DebugType>Full</DebugType>
</PropertyGroup>

这篇关于使用&lt; DebugType&gt; Full&lt; / DebugType&gt;有什么区别?和&lt; DebugType&gt; Portable&lt; / DebugType&gt; .net核心项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆