Git commit vsidx file access denied in Visual Studio
Asked Answered
B

3

9

I've recently updated Visual Studio to 17.8 and since then I can no longer do a Git commit.

The error it displays at the top of the Git panel is: Git failed with a fatal error error: open ("......\FileContentIndex...vsidx"):Access Denied

I'm running in Administrator mode, and I've removed the read only access from the repo folders. I've tried deleting the FileContentIndex but VS just recreates it. Tried Git add . but still cannot access index file. Tried it reset with no success.

Somehow this index file is preventing me from committing my changes. There's no options to disabled indexing. I'm running Visual Studio Professional 2022 17.8.2 (Not preview)

Bethsaida answered 29/11, 2023 at 10:53 Comment(1)
developercommunity.visualstudio.com/t/…Steelwork
S
25

It looks like you are trying to commit the .vs folder.

You should be git ignoring it.

Steelwork answered 29/11, 2023 at 11:0 Comment(1)
Thanks Matt Evans. You're absolutely right. I went Git > Settings > Source Control > Git Repository Settings... Then added the .gitignore file which by default included the .vs folder. This worked.Bethsaida
B
0

I had similar issue. Right click on a file with .vsidx and select "Ignore all files with .vsidx extension" and then you should be able to Commit your changes. At least I was. I am using: VS Community Version 17.9.5

Burnish answered 13/8 at 6:16 Comment(0)
R
-2

I went Git > Settings > Source Control > Git Repository Settings... Then added the .gitignore file

Resupinate answered 27/4 at 11:46 Comment(1)
This just partially copies OP's comment to the accepted answer, as an answer.Steelwork

© 2022 - 2024 — McMap. All rights reserved.