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

SourceLink.Copy.PdbFiles #315

Merged
merged 4 commits into from
Feb 2, 2018
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
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The [source link support documention](https://github.com/dotnet/core/blob/master
``` xml
<Project>
<ItemGroup>
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.7.6" PrivateAssets="All" />
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.0" PrivateAssets="All" />
</ItemGroup>
</Project>
```
Expand Down Expand Up @@ -49,7 +49,7 @@ As of SourceLink 2.7, the pdb files will automatically be included in your nupkg

Install by adding:
``` xml
<DotNetCliToolReference Include="dotnet-sourcelink" Version="2.7.6" />
<DotNetCliToolReference Include="dotnet-sourcelink" Version="2.8.0" />
```

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

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

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

# Known Issues

- New project system does not copy PDBs from packages when targeting .NET Framework

Add `SourceLink.Copy.PdbFiles` to your project file. See [#313](https://github.com/ctaggart/SourceLink/issues/313) for details.

``` xml
<Project>
<ItemGroup>
<PackageReference Include="SourceLink.Copy.PdbFiles" Version="2.8.0" PrivateAssets="All" />
</ItemGroup>
</Project>
```

- Private repositories are not supported

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).
Expand Down
22 changes: 22 additions & 0 deletions SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../build/common.props" />
<PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>
<ItemGroup Label="dotnet pack instructions">
<PackageReference Update="NETStandard.Library" PrivateAssets="all" />
<Content Include="SourceLink.Copy.PdbFiles.props">
<Pack>true</Pack>
<PackagePath>build</PackagePath>
</Content>
<Content Include="SourceLink.Copy.PdbFiles.props">
<Pack>true</Pack>
<PackagePath>buildCrossTargeting</PackagePath>
</Content>
<Content Include="SourceLink.Copy.PdbFiles.targets">
<Pack>true</Pack>
<PackagePath>build</PackagePath>
</Content>
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<AllowedReferenceRelatedFileExtensions>$(AllowedReferenceRelatedFileExtensions);.pdb</AllowedReferenceRelatedFileExtensions>
</PropertyGroup>
</Project>
8 changes: 8 additions & 0 deletions SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project>
<Target Name="AddReferenceRelatedPathsToCopyLocal" AfterTargets="ResolveAssemblyReferences"
Condition="('$(TargetFrameworkIdentifier)' != '.NETCoreApp') and ('$(TargetFrameworkIdentifier)' != '.NETStandard')">
<ItemGroup>
<ReferenceCopyLocalPaths Include="@(_ReferenceRelatedPaths)" />
</ItemGroup>
</Target>
</Project>
6 changes: 5 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$version = '2.7.7' # the version under development, update after a release
$version = '2.8.0' # the version under development, update after a release
$versionSuffix = '-a125' # manually incremented for local builds

function isVersionTag($tag){
Expand Down Expand Up @@ -58,6 +58,10 @@ Set-Location $psscriptroot\SourceLink.Embed.PaketFiles
dotnet restore
dotnet $pack

Set-Location $psscriptroot\SourceLink.Copy.PdbFiles
dotnet restore
dotnet $pack

Set-Location $psscriptroot\build
dotnet restore
$nupkgs = ls ..\bin\*$version$versionSuffix.nupkg
Expand Down