-
Notifications
You must be signed in to change notification settings - Fork 948
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 and nuget symbol packages #1930
Conversation
I think it's worth taking one step further and going directly to https://github.com/dotnet/reproducible-builds |
I certainly wouldn't object; can we merge this now and do that later, or does it make sense to do it at the same time? |
This is a simplification and improvement of the ideas of the current PR. This will also add a deterministic build. It combines all the best solutions from these articles: |
Also, VS is not good with symbols from snupkg files, so DebugType = embedded is much better for libraries and helps users debug problems: |
This enables SourceLink and debug symbol embedding, among other things. https://github.com/dotnet/reproducible-builds
This prevents the build from relying on outside libraries not described in the repo.
I pushed new commits that use DotNet.ReproducibleBuilds and a The last commit also adds DotNet.ReproducibleBuilds.Isolated, which ensures that the build doesn't depend on any outside libraries. So it adds a nuget package dependency for the .NET Framework reference assemblies since we no longer depend on the versions installed on the CI machines. We should be able to generate identical nuget packages on CI and developer machines with |
Sounds like it might help with CI configuration as well then. As an aside, with
This seems to have taken effect within VS, but there is no indication of this in VS, which is annoying (that said, I don't recall it showing up other prop imports either). NugetPackageExplorer reckons the CI build is OK: |
@mattico @HavenDV thanks both for this. Do we want a PR to add What does identical mean exactly? Same filehash? (doesn't seem to be the case) Of course, github actions is now complaining... https://github.com/oxyplot/oxyplot/actions/runs/3076201170 |
I haven't used DotNet.ReproducibleBuilds.Isolated so I can't say anything about it. But in general, the solution with Directory.Build looks good
Directory.Build.props is now a standard file for many repositories, these are just general properties for a specific directory and subdirectories. I usually add the entire NuGet configuration (unless each package requires a separate Description and Tags). To make it more explicit, I usually add it to the solution as a separate file at the same level where it is.
No additional configuration is required, it's all done by the DotNet.ReproducibleBuilds package. It sets this property based on a CI-specific environment variable that is always there.
Do you mean deterministic? it is described here |
Thanks for the additional information. I have to dash, will hopefully have time to look into the failing CI later today (mindlessly updating things hasn't done the job https://github.com/VisualMelon/oxyplot/actions/runs/3076290473/jobs/4970342386 ) |
You additionally need to change the TargetFramework from netcoreapp3.1 to net6.0 in those projects. Most likely, this will not require additional action. |
As I understand it, it is not necessary to specify Microsoft.NETFramework.ReferenceAssemblies, because this is done automatically by the DotNet.ReproducibleBuilds.Isolated package - https://github.com/dotnet/reproducible-builds/blob/main/src/DotNet.ReproducibleBuilds.Isolated/Sdk/Sdk.targets |
Fixes #1156.
Checklist
Changes proposed in this pull request:
@oxyplot/admins