-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Enable source link #1746
Enable source link #1746
Conversation
@ctaggart What is the cause of this error and how do I fix it? |
I don't know. What is your environment? I know it requires .NET SDK 2.1 https://github.com/dotnet/sourcelink/ . Can you give me a |
Any just to make sure your git repo is normal, can you run |
MSBuild is 15.7.179.6572 https://ci.appveyor.com/project/JamesNewtonKing/newtonsoft-json/build/1.0.1535#L231 I'm not actually building with dotnet cli. |
Normal looking? |
I updated dotnet CLI to latest just in case and still have the same error.
|
I'll check out the branch and see if I can reproduce it. |
I think you are hitting this bug: dotnet/sourcelink#62 May be try setting DeterministicSourcePaths to |
I opened up #1747 for that change to this branch. My build is still going, but I'm going to sleep: |
It builds. How can I tell if source link is part of the NuGet package and it is working correctly? |
When adding SourceLink support to my library I just used the generated NuGet Package in a local folder NuGet Package Source and tested it with a new console app. I also temporarily renamed my repo folder so it wouldn't find my local files. |
You can use Unfortunately, it is not working yet. Both of these fail:
|
</PropertyGroup> | ||
<ItemGroup> | ||
<None Remove="**\*.orig" /> | ||
<None Include="..\..\LICENSE.md" Pack="true" PackagePath="LICENSE.md" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(ContinuousIntegrationBuild)'=='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.
Microsoft.SourceLink.GitHub
is not being installed. I removing this condition in my pull request and will try it out.
Rather than adding <DeterministicSourcePaths Condition="'$(EnableSourceLink)' == ''">false</DeterministicSourcePaths> |
The |
You can now install |
There are no WPF projects. What exactly is I don't like setting values without knowing what the cause and effect is. I think the issue is the build script is building the entire solution. Setting |
Merged. Thanks for your help @ctaggart |
do you have a preview/nightly NuGet Package to test this? On myget I also only see the 11.0.2. |
thanks. Works, I see the SourceLink entry in the PDB (with dotPeek from Jetbrains)
and stepping through the code works fine in VS2017 15.7.4 |
The reason why |
Looking forward to 11.0.3 being published :-) |
I blogged about it: |
This PR had a possibly unintentional side effect: https://stackoverflow.com/a/53983050/4620101 Maybe it's worth mentioning it in documentation or somewhere (migration doc?). |
Since nuget.org server now supports uploading symbol packages, I'd recommend to remove the PDB from the package (remove <IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat> .snupkg file can then be published to nuget.org along with the main package. |
No description provided.