Skip to content
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

Support for sourcelink #64

Closed
taori opened this issue Jan 19, 2019 · 8 comments
Closed

Support for sourcelink #64

taori opened this issue Jan 19, 2019 · 8 comments

Comments

@taori
Copy link
Contributor

taori commented Jan 19, 2019

Adding sourcelink to the project would greatly benefit the project, because anyone could easily debug it and figure out what exactly is going wrong. Just now i'm having a bug, which would be easily detectable with this :)

I will provide help if you want.

@bilal-fazlani
Copy link
Owner

I had to disable it last time due to some issues. NuGet/Home#6082
Will enable again for next release

@taori
Copy link
Contributor Author

taori commented Jan 19, 2019

I had to disable it last time due to some issues. NuGet/Home#6082
Will enable again for next release

Nice. It's pretty simple to enable now.

You can take a peek at

https://github.com/taori/Amusoft.UI.WPF/blob/master/src/Amusoft.UI.WPF/Amusoft.UI.WPF.csproj

Though in CI i build with DebugType embedded + EmbedAllSources for best sourcelink user experience, so it does not depend on github / internet connection

@bilal-fazlani
Copy link
Owner

bilal-fazlani commented Jan 20, 2019

I am hoping this should do it. 16e5d3a + df7a0b2

@taori
Copy link
Contributor Author

taori commented Jan 20, 2019

@bilal-fazlani any specific reason you change netcore to 2.2 on the main project? That would limit its usage.

Also you might need to verify whether stepping into code works. appveyor does not support snupkg yet and debugging for snupkg doesnt seem to be working properly yet. That's why i went for DebugType=embedded + EmbedAllSources. That way sourcelink never did any file loading and worked out of the box

@bilal-fazlani
Copy link
Owner

any specific reason you change netcore to 2.2 on the main project? That would limit its usage.
We are back to 2.1 now

appveyor does not support snupkg yet and debugging for snupkg doesnt seem to be working properly yet. That's why i went for DebugType=embedded + EmbedAllSources. That way sourcelink never did any file loading and worked out of the box

Ok we are back to symbols.nupkg format.

This is how csproj looks like now

<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<EmbedAllSources>true</EmbedAllSources>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>

https://ci.appveyor.com/project/bilal-fazlani/commanddotnet/build/artifacts

Also you might need to verify whether stepping into code works.

I will do that

@bilal-fazlani
Copy link
Owner

Question @taori , with this, do I still need to publish a symbols package?

@taori
Copy link
Contributor Author

taori commented Jan 20, 2019

@bilal-fazlani with <DebugType>embedded</DebugType> you can make it <IncludeSymbols>false</IncludeSymbols>. IncludeSymbols is the parameter to generate *.symbols.nupkg. However with embedded, the .pdb info is included in the .dll. so you no longer need a .symbols.nupgk :)

That means nuget will only receive one nupkg and debug will be possible at all times.

@bilal-fazlani
Copy link
Owner

Awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants