Soucelink Support on .net aspire component

Dev1 0 Reputation points
2024-08-27T19:29:47.9366667+00:00

Does .net aspire components support sourcelink the way it works with nuget? Will I able to debug through .net aspire compnents with sourcelink?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,912 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 54,806 Reputation points
    2024-08-27T19:59:54.6933333+00:00

    Sourcelink is a debugging feature based upon the code you reference from NuGet. As such any NuGet package that supports Sourcelink will work. Aspire is more of a framework of components and architecture. Under the hood it relies on NuGet packages like ASP.NET Core for web apps and services. These packages support Sourcelink so yes they will continue to work with Aspire.

    If you want to know whether a NuGet package you rely on supports Sourcelink then you can just open the package metadata. If it has references to repositories then it most likely supports Sourcelink. Note that even if it doesn't, most packages ship with the .pdb files which have the debug symbols and Visual Studio has been able to debug with just the .pdbs for years. It isn't quite the same as having the source code but it is really close. So irrelevant of Sourcelink support, you can step through the code of third party components if you have the pdb files.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.