René's URL Explorer Experiment


Title: scriptcs + libgit2sharp -> Unable to load DLL 'git2' · Issue #431 · libgit2/libgit2sharp · GitHub

Open Graph Title: scriptcs + libgit2sharp -> Unable to load DLL 'git2' · Issue #431 · libgit2/libgit2sharp

X Title: scriptcs + libgit2sharp -> Unable to load DLL 'git2' · Issue #431 · libgit2/libgit2sharp

Description: If someone wants to jump on this, the current way of "including" git2.dll doesn't work when you try and reference it inside a scriptcs script. Repro: https://github.com/aaronpowell/scriptcs-git Script: using System; using LibGit2Sharp; s...

Open Graph Description: If someone wants to jump on this, the current way of "including" git2.dll doesn't work when you try and reference it inside a scriptcs script. Repro: https://github.com/aaronpowell/scriptcs-git Scr...

X Description: If someone wants to jump on this, the current way of "including" git2.dll doesn't work when you try and reference it inside a scriptcs script. Repro: https://github.com/aaronpowell/sc...

Mail addresses
notifications@github.com
libgit2sharp@noreply.github.com
notifications@github.comwrote
notifications@github.com
libgit2sharp@noreply.github.com

Opengraph URL: https://github.com/libgit2/libgit2sharp/issues/431

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"scriptcs + libgit2sharp -> Unable to load DLL 'git2' ","articleBody":"If someone wants to jump on this, the current way of \"including\" git2.dll doesn't work when you try and reference it inside a scriptcs script.\n\nRepro: https://github.com/aaronpowell/scriptcs-git\n\nScript:\n\n```\nusing System;\nusing LibGit2Sharp;\n\nstatic Repository InitOrOpen(string path)\n{\n    var gitBasePath = Repository.Discover(path);\n    if (gitBasePath == null)\n    {\n        Console.WriteLine(\"And we're creating a new git repo people!\");\n        return Repository.Init(path);\n    }\n    Console.WriteLine(\"Found existing repo, keep on trucking\");\n    return new Repository(gitBasePath);\n}\n\nusing (var repo = InitOrOpen(@\"C:\\temp\\git-fun\\out\"))\n{\n    Console.WriteLine(\"It's time to rock and rooooooooll\");\n}\n\nConsole.ReadLine();\n```\n\nThen, in the directory containing this script:\n\n```\nscriptcs -install\nscriptcs .\\app.csx -debug\n```\n\nWhich gives this output:\n\n```\nINFO : Starting to create execution components\nINFO : Starting execution\nERROR: An error occurred when executing the scripts.\nERROR: Exception Message: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.\nStack Trace:   at LibGit2Sharp.Core.NativeMethods.git_repository_discover(Byte[] repository_path, UIntPtr size, FilePath start_path, Boolean across_fs, FilePath ceiling_dirs)\n   at LibGit2Sharp.Core.Proxy.\u003c>c__DisplayClass1f.\u003cgit_repository_discover>b__1e(Byte[] buffer, UIntPtr bufSize)\n   at LibGit2Sharp.Core.Proxy.ConvertPath(Func`3 pathRetriever)\n   at LibGit2Sharp.Repository.Discover(String startingPath)\n   at Submission#0..ctor(Session session, Object& submissionResult) in D:\\Code\\github\\aaronpowell\\scriptcs-git\\.\\app.csx:line 16\n   at Submission#0.\u003cFactory>(Session session)\n\nUnhandled Exception: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'git2': The specified module could not be found. (Exception from HRESULT: 0x8007007E)\n   at LibGit2Sharp.Core.NativeMethods.git_threads_init()\n   at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject..ctor()\n   at LibGit2Sharp.Core.NativeMethods..cctor()\n   --- End of inner exception stack trace ---\n   at LibGit2Sharp.Core.NativeMethods.RemoveHandle()\n   at LibGit2Sharp.Core.NativeMethods.LibraryLifetimeObject.Finalize()\n```\n\nI don't expect the scriptcs guys to support PostBuildEvent like Visual Studio does, so I'm curious what our options might be for \"really important stuff you need to do after installing a package\" which seems to be the last opportunity to do that before scriptcs starts loading in assemblies.\n\ncc @glennblock @aaronpowell\n","author":{"url":"https://github.com/shiftkey","@type":"Person","name":"shiftkey"},"datePublished":"2013-05-13T03:09:43Z","url":"https://github.com/libgit2/libgit2sharp/issues/431"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:275baf14-3bf6-0908-dc94-2c6397dd41b5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8FD0:1F52F6:CE305A:114EA1A:6B005328
html-safe-nonce4b13f0a2b0ad2b11aa0fafca8747b3ea4354925f9845fd149e6fb92b572a9d6c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkQwOjFGNTJGNjpDRTMwNUE6MTE0RUExQTo2QjAwNTMyOCIsInZpc2l0b3JfaWQiOiI0NzIwNDY4NjY0MTMyODUwNDcyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacc2388c35c061dab2471cbe5d101462bb07c02a2b98b0bab5295c1cba193eac37
hovercard-subject-tagissue:14244214
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/libgit2/libgit2sharp/431/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fbedba814f13b8d406c5298fdd09246ec64c7bd5da1d0f9bacf644186626c0ae/libgit2/libgit2sharp/issues/431
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fbedba814f13b8d406c5298fdd09246ec64c7bd5da1d0f9bacf644186626c0ae/libgit2/libgit2sharp/issues/431
og:image:altIf someone wants to jump on this, the current way of "including" git2.dll doesn't work when you try and reference it inside a scriptcs script. Repro: https://github.com/aaronpowell/scriptcs-git Scr...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameshiftkey
hostnamegithub.com
expected-hostnamegithub.com
Nonef420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb
turbo-cache-controlno-preview
go-importgithub.com/libgit2/libgit2sharp git https://github.com/libgit2/libgit2sharp.git
octolytics-dimension-user_id394745
octolytics-dimension-user_loginlibgit2
octolytics-dimension-repository_id1415168
octolytics-dimension-repository_nwolibgit2/libgit2sharp
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1415168
octolytics-dimension-repository_network_root_nwolibgit2/libgit2sharp
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release26e00df917aba0f128135dc073ea0c5e33a70d40
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/libgit2/libgit2sharp/issues/431#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flibgit2%2Flibgit2sharp%2Fissues%2F431
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flibgit2%2Flibgit2sharp%2Fissues%2F431
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=libgit2%2Flibgit2sharp
Reloadhttps://github.com/libgit2/libgit2sharp/issues/431
Reloadhttps://github.com/libgit2/libgit2sharp/issues/431
Reloadhttps://github.com/libgit2/libgit2sharp/issues/431
libgit2https://github.com/libgit2
libgit2sharphttps://github.com/libgit2/libgit2sharp
Codehttps://github.com/libgit2/libgit2sharp
Issues406 (406)https://github.com/libgit2/libgit2sharp/issues
Pull requests54 (54)https://github.com/libgit2/libgit2sharp/pulls
Actionshttps://github.com/libgit2/libgit2sharp/actions
Projectshttps://github.com/libgit2/libgit2sharp/projects
Wikihttps://github.com/libgit2/libgit2sharp/wiki
Security and qualityhttps://github.com/libgit2/libgit2sharp/security
Insightshttps://github.com/libgit2/libgit2sharp/insights
https://github.com/libgit2/libgit2sharp
New issuehttps://github.com/login?return_to=https://github.com/libgit2/libgit2sharp/issues/431
New issuehttps://github.com/login?return_to=https://github.com/libgit2/libgit2sharp/issues/431
scriptcs + libgit2sharp -> Unable to load DLL 'git2' https://github.com/libgit2/libgit2sharp/issues/431#top
UnmergedOrDoNotRequireAFixhttps://github.com/libgit2/libgit2sharp/milestone/9
https://github.com/shiftkey
shiftkeyhttps://github.com/shiftkey
on May 13, 2013https://github.com/libgit2/libgit2sharp/issues/431#issue-14244214
https://github.com/aaronpowell/scriptcs-githttps://github.com/aaronpowell/scriptcs-git
@glennblockhttps://github.com/glennblock
@aaronpowellhttps://github.com/aaronpowell
https://github.com/nulltoken
nulltokenhttps://github.com/nulltoken
on May 13, 2013https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17794147
@shiftkeyhttps://github.com/shiftkey
#425https://github.com/libgit2/libgit2sharp/pull/425
https://github.com/shiftkey
shiftkeyhttps://github.com/shiftkey
on May 13, 2013https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17794281
@nulltokenhttps://github.com/nulltoken
https://github.com/anaisbetts
anaisbettshttps://github.com/anaisbetts
on May 13, 2013https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17794780
solved this problem almost two years agohttps://github.com/tclem/libgit2sharp/pull/3
https://github.com/shiftkey
shiftkeyhttps://github.com/shiftkey
on May 13, 2013https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17794929
https://github.com/anaisbetts
anaisbettshttps://github.com/anaisbetts
on May 13, 2013https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17795581
https://github.com/nulltoken
nulltokenhttps://github.com/nulltoken
on May 13, 2013https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17796796
@ethomsonhttps://github.com/ethomson
https://github.com/martinwoodward
martinwoodwardhttps://github.com/martinwoodward
on May 13, 2013https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17797355
#431https://github.com/libgit2/libgit2sharp/issues/431
/issues/431https://github.com/libgit2/libgit2sharp/issues/431
https://github.com/glennblock
glennblockhttps://github.com/glennblock
on May 13, 2013https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17800188
#431https://github.com/libgit2/libgit2sharp/issues/431
@ethomsonhttps://github.com/ethomson
https://github.com/ethomson>https://github.com/ethomson%3E
https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17796796>https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17796796%3E
/issues/431https://github.com/libgit2/libgit2sharp/issues/431
https://github.com/Pike
Pikehttps://github.com/Pike
on May 13, 2013https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17806371
https://github.com/shiftkey
shiftkeyhttps://github.com/shiftkey
on May 13, 2013https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-17807431
@Pikehttps://github.com/Pike
https://github.com/nulltoken
nulltokenhttps://github.com/nulltoken
on Jul 1, 2013https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-20300219
@shiftkeyhttps://github.com/shiftkey
scriptcs/scriptcs#250https://github.com/scriptcs/scriptcs/pull/250
shiftkeyhttps://github.com/shiftkey
completedhttps://github.com/libgit2/libgit2sharp/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jul 9, 2013https://github.com/libgit2/libgit2sharp/issues/431#event-55692905
https://github.com/dahlbyk
dahlbykhttps://github.com/dahlbyk
on Jan 15, 2014https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-32335920
scriptcs/scriptcs#495 (comment)https://github.com/scriptcs/scriptcs/issues/495#issuecomment-32335884
https://github.com/juanonsoftware
juanonsoftwarehttps://github.com/juanonsoftware
on Nov 16, 2018https://github.com/libgit2/libgit2sharp/issues/431#issuecomment-439316457
Sign up for freehttps://github.com/signup?return_to=https://github.com/libgit2/libgit2sharp/issues/431
Sign in to commenthttps://github.com/login?return_to=https://github.com/libgit2/libgit2sharp/issues/431
UnmergedOrDoNotRequireAFixhttps://github.com/libgit2/libgit2sharp/milestone/9
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.