Skip to content
This repository was archived by the owner on Apr 16, 2020. It is now read-only.

Commit 72e1bc2

Browse files
authored
SourceLink.Copy.PdbFiles (#315)
* copy PDBs from packages * Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" * and $(TargetFrameworkIdentifier)' != '.NETStandard' * parens
1 parent 36e4585 commit 72e1bc2

5 files changed

Lines changed: 56 additions & 4 deletions

File tree

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The [source link support documention](https://github.com/dotnet/core/blob/master
2020
``` xml
2121
<Project>
2222
<ItemGroup>
23-
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.7.6" PrivateAssets="All" />
23+
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.0" PrivateAssets="All" />
2424
</ItemGroup>
2525
</Project>
2626
```
@@ -49,7 +49,7 @@ As of SourceLink 2.7, the pdb files will automatically be included in your nupkg
4949

5050
Install by adding:
5151
``` xml
52-
<DotNetCliToolReference Include="dotnet-sourcelink" Version="2.7.6" />
52+
<DotNetCliToolReference Include="dotnet-sourcelink" Version="2.8.0" />
5353
```
5454

5555
# Embedding Source Files
@@ -60,14 +60,26 @@ For source files are not committed to the repository, it is helpful to embed the
6060

6161
If you just want to embed all of the source files in the pdb and not use source link support, add this package:
6262
``` xml
63-
<PackageReference Include="SourceLink.Embed.AllSourceFiles" Version="2.7.6" PrivateAssets="all" />
63+
<PackageReference Include="SourceLink.Embed.AllSourceFiles" Version="2.8.0" PrivateAssets="all" />
6464
```
6565

6666
# Documentation
6767
Additional [documentation is on the wiki](https://github.com/ctaggart/SourceLink/wiki).
6868

6969
# Known Issues
7070

71+
- New project system does not copy PDBs from packages when targeting .NET Framework
72+
73+
Add `SourceLink.Copy.PdbFiles` to your project file. See [#313](https://github.com/ctaggart/SourceLink/issues/313) for details.
74+
75+
``` xml
76+
<Project>
77+
<ItemGroup>
78+
<PackageReference Include="SourceLink.Copy.PdbFiles" Version="2.8.0" PrivateAssets="All" />
79+
</ItemGroup>
80+
</Project>
81+
```
82+
7183
- Private repositories are not supported
7284

7385
Visual Studio 2017 15.6 may add support. Please vote for User Voice: [Debugger should support authentication with SourceLink](https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/19107784-debugger-should-support-authentication-with-source).
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../build/common.props" />
3+
<PropertyGroup>
4+
<TargetFramework>netstandard1.4</TargetFramework>
5+
<IncludeBuildOutput>false</IncludeBuildOutput>
6+
</PropertyGroup>
7+
<ItemGroup Label="dotnet pack instructions">
8+
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
9+
<Content Include="SourceLink.Copy.PdbFiles.props">
10+
<Pack>true</Pack>
11+
<PackagePath>build</PackagePath>
12+
</Content>
13+
<Content Include="SourceLink.Copy.PdbFiles.props">
14+
<Pack>true</Pack>
15+
<PackagePath>buildCrossTargeting</PackagePath>
16+
</Content>
17+
<Content Include="SourceLink.Copy.PdbFiles.targets">
18+
<Pack>true</Pack>
19+
<PackagePath>build</PackagePath>
20+
</Content>
21+
</ItemGroup>
22+
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
<PropertyGroup>
3+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
4+
<AllowedReferenceRelatedFileExtensions>$(AllowedReferenceRelatedFileExtensions);.pdb</AllowedReferenceRelatedFileExtensions>
5+
</PropertyGroup>
6+
</Project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project>
2+
<Target Name="AddReferenceRelatedPathsToCopyLocal" AfterTargets="ResolveAssemblyReferences"
3+
Condition="('$(TargetFrameworkIdentifier)' != '.NETCoreApp') and ('$(TargetFrameworkIdentifier)' != '.NETStandard')">
4+
<ItemGroup>
5+
<ReferenceCopyLocalPaths Include="@(_ReferenceRelatedPaths)" />
6+
</ItemGroup>
7+
</Target>
8+
</Project>

build.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$version = '2.7.7' # the version under development, update after a release
1+
$version = '2.8.0' # the version under development, update after a release
22
$versionSuffix = '-a125' # manually incremented for local builds
33

44
function isVersionTag($tag){
@@ -58,6 +58,10 @@ Set-Location $psscriptroot\SourceLink.Embed.PaketFiles
5858
dotnet restore
5959
dotnet $pack
6060

61+
Set-Location $psscriptroot\SourceLink.Copy.PdbFiles
62+
dotnet restore
63+
dotnet $pack
64+
6165
Set-Location $psscriptroot\build
6266
dotnet restore
6367
$nupkgs = ls ..\bin\*$version$versionSuffix.nupkg

0 commit comments

Comments
 (0)