Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio ignores *.jfm entry in the gitIgnore file

I'm having a problem with Visual Studio 2013 locking a .jfm file. I am unable to save project changes to the local git repository when the project is open.

The error looks like this when clicking on the Commit button in the Team Explorer -> Changes panel:

"An error occurred. Detailed message: Could not open 'C:/Uers/Username/Documents/Visual Studio 2013/Projects/ProjectName/ProjectNameSQL/ProjectNameSQL.jfm': The process cannot access the file because it is being used by another process."

For example, when I make a change to the default.aspx in the project and look for changes in the Changes panel, only the default.aspx.designer.vb and default.asp.vb files show that changes have been made. only after closing the solution do I see a third file, default.aspx, appear in the Included Changes list of files.

I have already added .jfm to .gitignore and cleared the cache as noted in a previous solution described in this thread.

I am using the visualstudio.com git repository to sync changes and have manually edited the .gitignore file there as well.

How would I fix this error?

like image 588
desertchief Avatar asked Aug 15 '17 22:08

desertchief


2 Answers

I fixed this by

  • Add *.jfm as a line to the local .gitignore
  • Close the solution (but stay connected in Team Explorer)
  • Delete the .jfm file in file explorer
  • Commit the .jfm deletion and the .gitignore edit
  • Reopen the solution and rebuild
  • Should see that there are no .jfm changes
like image 81
Kaido Avatar answered Sep 19 '22 10:09

Kaido


I happened upon a post on the visual studio forum, and used some of the information provided there to point me in the right direction. see here

however, an additional error occurred when trying to Sync the changes,

An error occurred. Detailed message: 1 conflict prevents checkout

additional steps were needed, perhaps because sql services were running on the local machine.

this process worked for me:

  • in the local visual studio app, add *.jfm to the # User-specific files section of the local .gitignore file
  • exit visual studio locally
  • remove the .jfm file from the remote repo by logging into the visualstudio.com account and deleting the file there.
  • open Services on the local machine
  • stop any sql services that may be running
  • rename the local .jfm file and its file extension (e.g. rename the file to sqlfile-jfm.original)
  • re-start the sql services
  • re-start visual studio locally
  • update the local repo using Unsynced Commits -> Pull

hope this helps others with a similar problem.

like image 26
desertchief Avatar answered Sep 18 '22 10:09

desertchief