Skip to content

Conversation

@fgreinacher
Copy link
Contributor

@fgreinacher fgreinacher commented Jul 16, 2018

This PR adds SourceLink support to our assemblies/PDBs.

I verified it using sourcelink test as per the documentation and everything looks good.

@fgreinacher fgreinacher changed the title WIP: Add SourceLink Add SourceLink Jul 25, 2018
@fgreinacher
Copy link
Contributor Author

Any objections on merging this?

@jpreese
Copy link
Member

jpreese commented Jul 26, 2018

This actually seems really cool. This has always been a big issue at my place of work (the need to debug packages), and we've always had to do some pretty big heroics to get that functionality.

For this, all I'd want to do is test it. Intentionally break something in the library, create a local package, reference said package, and see what the debugging story is like.

@jpreese
Copy link
Member

jpreese commented Jul 28, 2018

Hm.. I'm no longer able to create a NuGet package when I checkout this branch locally (dotnet pack). The error is quite lengthy, but here's a snippet.

image

C:\Users\jpree.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly.\r [C:\Users\jpree\Desktop\System.IO.Abstractions\System.IO.Abstractions\System.IO.Abstractions.csproj]
C:\Users\jpree.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.DotNet.PlatformAbstractions, Version=2.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.\r [C:\Users\jpree\Desktop\System.IO.Abstractions\System.IO.Abstractions\System.IO.Abstractions.csproj]
C:\Users\jpree.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at Microsoft.Build.Tasks.Git.RuntimeIdMap.GetNativeLibraryDirectoryName()\r [C:\Users\jpree\Desktop\System.IO.Abstractions\System.IO.Abstractions\System.IO.Abstractions.csproj]
C:\Users\jpree.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at Microsoft.Build.Tasks.Git.GitLoaderContext.GetNativeLibraryDirectory() in //src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 55\r [C:\Users\jpree\Desktop\System.IO.Abstractions\System.IO.Abstractions\System.IO.Abstractions.csproj]
C:\Users\jpree.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at Microsoft.Build.Tasks.Git.GitLoaderContext.LoadUnmanagedDll(String unmanagedDllName) in /
/src/Microsoft.Build.Tasks.Git/GitLoaderContext.cs:line 30\r [C:\Users\jpree\Desktop\System.IO.Abstractions\System.IO.Abstractions\System.IO.Abstractions.csproj]
C:\Users\jpree.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unmanagedDllName, IntPtr gchManagedAssemblyLoadContext)\r [C:\Users\jpree\Desktop\System.IO.Abstractions\System.IO.Abstractions\System.IO.Abstractions.csproj]
C:\Users\jpree.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()\r [C:\Users\jpree\Desktop\System.IO.Abstractions\System.IO.Abstractions\System.IO.Abstractions.csproj]
C:\Users\jpree.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()\r [C:\Users\jpree\Desktop\System.IO.Abstractions\System.IO.Abstractions\System.IO.Abstractions.csproj]
C:\Users\jpree.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: at LibGit2Sharp.Core.NativeMethods..cctor()\r [C:\Users\jpree\Desktop\System.IO.Abstractions\System.IO.Abstractions\System.IO.Abstractions.csproj]
C:\Users\jpree.nuget\packages\microsoft.build.tasks.git\1.0.0-beta-63102-01\build\Microsoft.Build.Tasks.Git.targets(20,5): error MSB4018: --- End of inner exception stack trace ---\r [C:\Users\jpree\Desktop\System.IO.Abstractions\System.IO.Abstractions\System.IO.Abstractions.csproj]

@fgreinacher
Copy link
Contributor Author

Do you have .NET Core SDK 2.1.300? This seems so be the minimum supported version as per dotnet/sourcelink#107

Co-Authored-By: fgreinacher <fgreinacher@users.noreply.github.com>
@fgreinacher fgreinacher closed this Dec 2, 2018
@fgreinacher fgreinacher reopened this Dec 2, 2018
@fgreinacher fgreinacher reopened this Nov 25, 2020
@fgreinacher fgreinacher deleted the source-link branch March 25, 2021 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants