From bf26a4191222c5974e344fa5250f0889ce761140 Mon Sep 17 00:00:00 2001 From: Cameron Taggart Date: Fri, 2 Feb 2018 12:10:32 -0500 Subject: [PATCH 1/4] copy PDBs from packages --- README.md | 18 ++++++++++++--- .../SourceLink.Copy.PdbFiles.csproj | 22 +++++++++++++++++++ .../SourceLink.Copy.PdbFiles.props | 6 +++++ .../SourceLink.Copy.PdbFiles.targets | 7 ++++++ build.ps1 | 6 ++++- 5 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.csproj create mode 100644 SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.props create mode 100644 SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets diff --git a/README.md b/README.md index 47b2d57..38765ae 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The [source link support documention](https://github.com/dotnet/core/blob/master ``` xml - + ``` @@ -49,7 +49,7 @@ As of SourceLink 2.7, the pdb files will automatically be included in your nupkg Install by adding: ``` xml - + ``` # Embedding Source Files @@ -60,7 +60,7 @@ 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 - + ``` # Documentation @@ -68,6 +68,18 @@ Additional [documentation is on the wiki](https://github.com/ctaggart/SourceLink # 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 + + + + + +``` + - 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). diff --git a/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.csproj b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.csproj new file mode 100644 index 0000000..a43cf2a --- /dev/null +++ b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.csproj @@ -0,0 +1,22 @@ + + + + netstandard1.4 + false + + + + + true + build + + + true + buildCrossTargeting + + + true + build + + + \ No newline at end of file diff --git a/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.props b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.props new file mode 100644 index 0000000..482d1e9 --- /dev/null +++ b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.props @@ -0,0 +1,6 @@ + + + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb + $(AllowedReferenceRelatedFileExtensions);.pdb + + \ No newline at end of file diff --git a/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets new file mode 100644 index 0000000..6d37869 --- /dev/null +++ b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/build.ps1 b/build.ps1 index 005ff6a..7396fcf 100644 --- a/build.ps1 +++ b/build.ps1 @@ -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){ @@ -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 From 7d19e9705915cf26f76660483c5dd5e35930e5fe Mon Sep 17 00:00:00 2001 From: Cameron Taggart Date: Fri, 2 Feb 2018 13:51:05 -0500 Subject: [PATCH 2/4] Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" --- SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets index 6d37869..66a7597 100644 --- a/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets +++ b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets @@ -1,5 +1,6 @@  - + From 51434c761018f383da8917eb25db4a86a9a83d9f Mon Sep 17 00:00:00 2001 From: Cameron Taggart Date: Fri, 2 Feb 2018 14:03:50 -0500 Subject: [PATCH 3/4] and $(TargetFrameworkIdentifier)' != '.NETStandard' --- SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets index 66a7597..c1d8696 100644 --- a/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets +++ b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets @@ -1,6 +1,6 @@  + Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp' and $(TargetFrameworkIdentifier)' != '.NETStandard'"> From d84e033bdd98bb14ae06401132b073cf384a0a3e Mon Sep 17 00:00:00 2001 From: Cameron Taggart Date: Fri, 2 Feb 2018 14:17:14 -0500 Subject: [PATCH 4/4] parens --- SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets index c1d8696..f91d77b 100644 --- a/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets +++ b/SourceLink.Copy.PdbFiles/SourceLink.Copy.PdbFiles.targets @@ -1,6 +1,6 @@  + Condition="('$(TargetFrameworkIdentifier)' != '.NETCoreApp') and ('$(TargetFrameworkIdentifier)' != '.NETStandard')">