【问题标题】:Libgit2Sharp Compile Time ErrorLibgit2Sharp 编译时错误
【发布时间】:2017-02-21 19:29:00
【问题描述】:

我正在开发一个使用 libgit2sharp 的库,并且我正在尝试将其包含在一个 asp.net WEB API 项目中。

库本身的构建没有任何问题。此外,使用我开发的库的控制台和 WPF 项目编译没有任何问题。但是,当我在 ASP.NET Web API 项目中包含该库时,会出现以下错误。

Failed to make the following project runnable: MYAPI(.NETFramework,Version=v4.5.2) reason: The process cannot access the file 'c:\path\to\project\packages\libgit2sharp.nativebinaries.1.0.164\libgit2\libgit2sharp.dll.config' 
because it is being used by another process. MYAPI    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets    262

【问题讨论】:

    标签: c# asp.net asp.net-web-api libgit2sharp


    【解决方案1】:

    很可能您的文件正在被您之前通过调试您的一个应用程序启动的某个 *.vhost 进程使用。 Visual Studio 有时无法正确终止所有进程。

    试试下面的

    1. 关闭 Visual Studio 并重新开始
    2. 如果 1. 没有帮助,请登录您的 Windows 帐户。重新登录。

    【讨论】:

    • 这不是常见的使用错误,这些并没有解决我只是在写我如何解决这个特定情况下的问题。我基本上下载了 libgit2sharp 源代码并自己构建,而不是使用 nuget 包。然后我将 Release 文件夹复制到我的项目中。之后,我将 libgit2sharp.dll 作为参考,然后将特定于平台的 (win32/x64) git2-1196807.dll 作为常规文件,并将复制到输出目录设置设置为 always。
    猜你喜欢
    • 1970-01-01
    • 2023-03-20
    • 2013-05-18
    • 1970-01-01
    • 2023-04-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-11
    • 1970-01-01
    相关资源
    最近更新 更多