-
Notifications
You must be signed in to change notification settings - Fork 293
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 SDK projects #1800
Add sourcelink support to SDK projects #1800
Conversation
Adding package reference to Microsoft.SourceLink.GitHub
/AzurePipelines run |
Azure Pipelines successfully started running 3 pipeline(s). |
linux builds are failing. my bust guess is that the new package isn't netstandard compatible. we only need this for signed builds, so I'm testing a Windows condition.
/AzurePipelines run |
Azure Pipelines successfully started running 3 pipeline(s). |
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.
Hey @eddynaka,
All of this is good but I need you to make one additional change.
The Sourcelink package isn't compatible with our Linux builds.
I need you ta change the <ItemGroup>
to <ItemGroup Condition=" $(OS) == 'Windows_NT'">
.
This will unblock Linux builds but will allow our signing to incorporate the SourceLink.
I verified this change already on the Microsoft.ApplicationInsights.csproj. Can you please make this same change on the other csproj?
/AzurePipelines run |
Azure Pipelines successfully started running 3 pipeline(s). |
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.
Hey @eddynaka
the build nupkgs do not have the Source Link.
I built locally and my local builds don't have it either.
Please investigate when you get a chance. Thanks
/AzurePipelines run |
Azure Pipelines successfully started running 3 pipeline(s). |
/AzurePipelines run |
Azure Pipelines successfully started running 3 pipeline(s). |
I would not recommend adding SourceLink to each project individually. It's a pain to then update. Put the reference into a Directory.Build.props file. It works on all OS's. |
<!-- indicate that the build executes on a build/CI server --> | ||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild> | ||
<!-- mapping all source paths included in the project outputs to deterministic values --> | ||
<DeterministicSourcePaths>true</DeterministicSourcePaths> |
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.
No need to set this manually, this should be set by the targets
<!--Build Infrastructure--> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.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.
The SourceLink reference should be added on all OS's
<!--Build Infrastructure--> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.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.
The SourceLink reference should be added on all OS's
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(BuildServer)' == 'true'"> |
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.
This should be at Directory.Build.props
A few things should be added to a Directory.Build.targets as well: |
Fix Issue #1760 .
Changes
Adding common properties to _nupkg.props;
Adding package reference to Microsoft.SourceLink.GitHub
Checklist
For significant contributions please make sure you have completed the following items:
The PR will trigger build, unit tests, and functional tests automatically. Please follow these instructions to build and test locally.
Notes for authors:
Notes for reviewers:
/AzurePipelines run
will queue all builds/AzurePipelines run <pipeline-name>
will queue a specific build