-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SourceLink support to package #42
base: main
Are you sure you want to change the base?
Conversation
30cfc99
to
b2258ce
Compare
@weichch Are you still maintaining this package? Happy to take it over if not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @matracey Thanks again for taking effort to contribute. Like I mentioned in the comments, can we please track the repository house-keeping changes in a separate issue?
It's a little hard to follow the actual changes in this PR with more than 100 files changed due to reformatting.
@@ -0,0 +1,138 @@ | |||
| |||
Microsoft Visual Studio Solution File, Format Version 12.00 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why moved solution file here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it makes more sense to have the sln file at the root, since the src folder will contain the source for the library itself, and the test folder will contain the source code for the tests.
IMO, it's easier to find the sln file in the root, since many open source .NET repos follow this paradigm, and it makes more sense to reference like src\SystemTextJson.JsonDiffPatch\SystemTextJson.JsonDiffPatch.csproj
& test\SystemTextJson.JsonDiffPatch.UnitTests\SystemTextJson.JsonDiffPatch.UnitTests.csproj
rather than SystemTextJson.JsonDiffPatch\SystemTextJson.JsonDiffPatch.csproj
& ..\test\SystemTextJson.JsonDiffPatch.UnitTests\SystemTextJson.JsonDiffPatch.UnitTests.csproj
.
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of adding this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added SourceLink because it provides a great source debugging experience for end users. It provides a lot of debug-time assistance, allowing to step into the source code of the compiled NuGet package by pulling the source from GitHub, rather than trying to use decompilation. SourceLink is supported by Microsoft and included in the .NET SDK for a variety of common source control providers, including GitHub, and adding it provides a quick win for a much improved package consumer experience.
I cherry picked some of the changes in this PR into #43 as co-authored commit. Let's keep this PR open for addressing VS Code support if you wish. I also found Microsoft has added two new methods in .NET 8 |
e03d069
to
e72126c
Compare
e72126c
to
9f29013
Compare
New features and updates
522be95
add debug symbols and explicit packable configuration tosrc/Directory.build.props
f1fd5d7
add explicitSourceLink.GitHub
package reference31bd648
add msbuild properties forSourceLink
e72126c
upgrade packages to latest versionsProject structure enhancements
558b8cb
movesln
file up to project rootf616e41
add missing loose items tosln
filef4ef2d5
add recommended VS Code extensions toextensions.json
8cecd49
updategitignore
usingdotnet new gitignore
7b1e292
addglobal.json
with SDK version configurationd554044
addIsTestProject
property toDirectory.Build.props
for test folder5ea3667
updateAssemblyVersion
andFileVersion
to useJsonDiffPatchPackageVersion