Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Use Portable PDBs and turn on SourceLink #24025

Merged
merged 5 commits into from
Oct 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BuildToolsVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0-prerelease-02126-05
2.0.0-prerelease-02127-07
3 changes: 3 additions & 0 deletions Documentation/building/code-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ Some of the libraries for which contracts and tests live in the corefx repo are
1. Follow the steps outlined at [Testing with Private CoreClr Bits](https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md#testing-with-private-coreclr-bits). Make sure to include the optional steps listed as being required for code coverage.
2. Add /p:CodeCoverageAssemblies="System.Private.CoreLib" to the previously discussed msbuild command, e.g. msbuild /t:BuildAndTest /p:Coverage=true /p:CodeCoverageAssemblies="System.Private.CoreLib"

Note that you will also want to copy the System.Private.CoreLib.pdb along with the System.Private.CoreLib.dll. As of 10/2017 this PDB must be a windows PDB (Hopefully by early 2018 OpenCOver will directly support portable PDBs.
You can determine if it is a windows PDB by doing 'more System.Private.CoreLib.pdb. If it begins with 'Microsoft C/C++ MSF 7.00' it is a windows PDB) If you need a windows PDB the Pdb2Pdb tool will convert (or you can do a msbuild /t:rebuild /p:DebugType=full in the src\mscorlib)

The resulting code coverage report should now also include details for System.Private.CoreLib.
6 changes: 6 additions & 0 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@
<BuildingUAPAOTVertical Condition="'$(BuildingUAPAOTVertical)' == '' AND ('$(_bc_TargetGroup)'=='uapaot' OR '$(BuildAllConfigurations)' == 'true')">true</BuildingUAPAOTVertical>
</PropertyGroup>

<!-- Set the kind of PDB to Portable and turn on SourceLink (fetching source from GitHub) -->
<PropertyGroup>
<DebugType Condition="'$(DebugType)' == ''">Portable</DebugType>
Copy link
Member

@jkotas jkotas Sep 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: This makes the lines below that set DebugType to full/pdbonly unnecessary.

<UseSourceLink>true</UseSourceLink>
</PropertyGroup>

<!-- Set up Default symbol and optimization for Configuration -->
<Choose>
<When Condition="'$(ConfigurationGroup)'=='Debug'">
Expand Down