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

Commit

Permalink
Merge pull request #24025 from vancem/PortablePdbsAndSourceServer
Browse files Browse the repository at this point in the history
Use Portable PDBs and turn on SourceLink
  • Loading branch information
vancem authored Oct 27, 2017
2 parents c17b2dd + daf4761 commit 968cfcf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
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>
<UseSourceLink>true</UseSourceLink>
</PropertyGroup>

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

0 comments on commit 968cfcf

Please sign in to comment.