libgit2引发了一个错误。类别=操作系统(错误) [英] An error was raised by libgit2. Category = Os (Error)
问题描述
我现在遇到了这几次:
libgit2引发了一个错误。类别=操作系统(错误)。
在编写代码时,这有时会导致此错误或类似错误:
未能打开'... / App_Data / .... mdf':
进程无法访问该文件,因为它正在被另一个处理。
当发生这种情况时,无法重新启动我的 Visaul Studio 2012
。
我认为它是由源代码管理 - Git
造成的,因为我没有记得在我为Visual Studio和Team Foundation安装Git扩展之前有这个问题。
有没有其他人遇到过这个问题,他们是如何解决这个问题的?
我今天刚刚遇到了一个新的Visual Studio项目。该项目使用自动生成的 .gitignore
,其中有以下条目,我认为应该覆盖 .mdf
文件细:
#SQL Server文件
App_Data / *。mdf
App_Data / *。ldf
但是我仍然收到:
libgit2引发了一个错误。类别=操作系统(错误)。
未能打开'... / App_Data / .... mdf':
进程无法访问该文件,因为该文件正在被另一个进程使用。
因此,我编辑了 .gitignore
,每个条目都带有星号斜杠,如下所示:
#SQL Server文件
* / App_Data / *。mdf
* / App_Data / *。ldf
我可以继续照常营业。
I have run into this several times now:
An error was raised by libgit2. Category = Os (Error).
Which sometimes causes this or similar error while i am writing code:
Failed to open '.../App_Data/....mdf':
The process cannot access the file because it is being used by another process.
When this happens i can't code without restarting my Visaul Studio 2012
.
I think it's being caused by Source Control - Git
as i don't remember having this problem before i installed the Git extension for Visual Studio and Team Foundation.
Has anyone else run into this and how did they solve it?
I just ran into this today with a new Visual Studio project. The project was using the autogenerated .gitignore
which had the following entries which I thought should have covered the .mdf
file just fine:
# SQL Server files
App_Data/*.mdf
App_Data/*.ldf
However I still received:
An error was raised by libgit2. Category = Os (Error).
Failed to open '.../App_Data/....mdf':
The process cannot access the file because it is being used by another process.
So I edited the .gitignore
, preceding each entry with an asterisk-slash, like so:
# SQL Server files
*/App_Data/*.mdf
*/App_Data/*.ldf
And I was able to continue business as usual.
这篇关于libgit2引发了一个错误。类别=操作系统(错误)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!