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

Added GitLink support #1003

Closed
wants to merge 4 commits into from
Closed

Conversation

GeertvanHorrik
Copy link

No description provided.

@nulltoken
Copy link
Member

@GeertvanHorrik Thanks for this. I've given it a try but didn't succeed in stepping in during debug.

Then I realized that maybe the content of /nuget.package/BuildNugetPackage.ps1 should be tweaked as well as part of this PR.

Thoughts?

@GeertvanHorrik
Copy link
Author

You must put the pdb files inside the nuget package.

@nulltoken
Copy link
Member

Could you please add the proposed changes below to your PR? Those should:

  • No longer build a symbol package
  • Embed the produced .pdb files in the package
diff --git a/nuget.package/BuildNugetPackage.ps1 b/nuget.package/BuildNugetPackage.ps1
index 5dac796..c5b623f 100644
--- a/nuget.package/BuildNugetPackage.ps1
+++ b/nuget.package/BuildNugetPackage.ps1
@@ -71,8 +71,7 @@ try {
   Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Restore "$(Join-Path $projectPath "..\LibGit2Sharp.sln")" }

   # Cf. https://stackoverflow.com/questions/21728450/nuget-exclude-files-from-symbols-package-in-nuspec
-  Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Pack -Build -Symbols "$(Join-Path $projectPath "LibGit2Sharp.csproj")" -Prop Configuration=Release -Exclude "**/NativeBinaries/**/*.*"}
-  Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Pack "$(Join-Path $projectPath "LibGit2Sharp.csproj")" -Prop Configuration=Release }
+  Run-Command { & "$(Join-Path $projectPath "..\Lib\NuGet\Nuget.exe")" Pack -Build "$(Join-Path $projectPath "LibGit2Sharp.csproj")" -Prop Configuration=Release }
 }
 finally {
   Pop-Location
diff --git a/nuget.package/LibGit2Sharp.nuspec b/nuget.package/LibGit2Sharp.nuspec
index f605336..3b99741 100644
--- a/nuget.package/LibGit2Sharp.nuspec
+++ b/nuget.package/LibGit2Sharp.nuspec
@@ -24,5 +24,6 @@
     <file src="..\CHANGES.md" target="App_Readme\LibGit2Sharp.CHANGES.md" />
     <file src="..\nuget.package\build\*.*" target="build\net40" />
     <file src="..\Lib\NativeBinaries\libgit2.license.txt" target="App_Readme" />
+    <file src="bin\$configuration$\$id$.pdb" target="lib\net40" />
   </files>
 </package>

@GeertvanHorrik
Copy link
Author

Done.

@nulltoken
Copy link
Member

Hmmm.

I've downloaded the NuGet package from the last AppVeyor build and created a small Console App
which references it locally.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LibGit2Sharp;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(GlobalSettings.Version);
            Console.ReadLine();
        }
    }
}

Note: Enable source server support is ticked in VS options.

I've set a breakpoint at the Console.WriteLine() level and hit F5.

Then I've hit F11 and got the following

image

@GeertvanHorrik What did I miss?

@GeertvanHorrik
Copy link
Author

How can I get the latest AppVeyor nuget package? Then I can test it.

@nulltoken
Copy link
Member

How can I get the latest AppVeyor nuget package? Then I can test it.

Click on the latest AppVeyor build log, pick one of the jobs, click on the Artifacts tab, download and 🎉!

@GeertvanHorrik
Copy link
Author

Seems like the pdbs are not updated. They should contain something similar like this:

SRCSRV: variables ------------------------------------------
SRCSRVVERCTRL=https
SRCSRVTRG=https://raw.github.com/Catel/Catel/260de28062897c0dbaaefd0b10f03737a99bbd25/%var2%
SRCSRV: source files ---------------------------------------
C:\CI_WS\Ws\74179\Source\Catel\src\Catel.Core\Catel.Core.Shared\ApiCop\ApiCop.cs*src/Catel.Core/Catel.Core.Shared/ApiCop/ApiCop.cs
C:\CI_WS\Ws\74179\Source\Catel\src\Catel.Core\Catel.Core.Shared\ApiCop\ApiCopListenerBase.cs*src/Catel.Core/Catel.Core.Shared/ApiCop/ApiCopListenerBase.cs
C:\CI_WS\Ws\74179\Source\Catel\src\Catel.Core\Catel.Core.Shared\ApiCop\ApiCopManager.cs*src/Catel.Core/Catel.Core.Shared/ApiCop/ApiCopManager.cs

@nulltoken
Copy link
Member

Oh! I think they're actually overwritten by the NuGet.exe command. Could you please try to remove the -Build switch?

@GeertvanHorrik
Copy link
Author

Done. Hope it's ok, this is becoming the hardest PR in my life.... ;-)

@Therzok
Copy link
Member

Therzok commented Mar 19, 2015

Practice makes perfect. :D

@nulltoken
Copy link
Member

Dammit!! I forgot to thin about this as well.

We also should drop the following

Clean-OutputFolder (Join-Path $projectPath "bin\")
Clean-OutputFolder (Join-Path $projectPath "obj\")

@nulltoken
Copy link
Member

@GeertvanHorrik Ok, I've successfully stepped in while in debug mode.

@jamill @ethomson @therzork Can you please share your thoughts about this proposal?

@nulltoken
Copy link
Member

/cc @Therzok

@Therzok
Copy link
Member

Therzok commented Mar 20, 2015

lgtm

@GeertvanHorrik
Copy link
Author

ctaggart pushed a commit to ctaggart/libgit2sharp that referenced this pull request Mar 22, 2015
@nulltoken
Copy link
Member

@GeertvanHorrik Thanks for this.

Because @ctaggart was the first to actually touch base with LibGit2Sharp (with #465 and #876), I think I'm going to rather consider #1009 over this one.

Cheers!

@nulltoken nulltoken closed this Mar 22, 2015
@nulltoken nulltoken added this to the UnmergedOrDoNotRequireAFix milestone Mar 22, 2015
@GeertvanHorrik GeertvanHorrik deleted the pr/gitlink branch March 22, 2015 12:34
@GeertvanHorrik
Copy link
Author

Next time please tell that in advance, would have saved me a lot of time which I could have put in other OS work.

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

Successfully merging this pull request may close these issues.

3 participants