Visual Studio 2015 Database Project directory contains a file with extension jfm
Asked Answered
R

2

263

Assuming we have a database project called MyDatabase then a file called MyDatabase.jfm appears in the root of the project directory.

  • It is exclusively locked while the project is open in Visual Studio
  • It is a binary file
  • It has only started appearing recently (past couple of days)

I have done a Google search, which has not offered any insight. There are some references to some old software, but most of the results are spam/trojanware. I have also looked in SO, but that has not produced any results either.

Does anyone know what it is and why it's there?

The plan is to add it to the gitignore file for Visual Studio, but I need to know what it is first to submit the PR...

UPDATE

This is now breaking the Team Explorer Changes view. There are no changes being shown with the following from the Output window:

Screenshot of the error from the output tab

As such I will be adding the file to the .gitignore file and submitting the PR. It would be good to eventually learn what this file is and where it came from...

Radford answered 8/6, 2016 at 13:52 Comment(21)
I just created database project in VS 2015. It doesn't seem to be there, even after i compile project.Arcturus
it wasn't for me either; it just appeared a couple of days ago like I saidRadford
Some of my solutions has (solution root)\.vs\niuPlatform\v14\vbcs.cache\storage.jfm file, and has the same size (16384) and similar content. Cause they are under vbcs.cache, so I guess they are some kind of cache, can be regenerate if needed. And they should not be check-in.Blaspheme
@Blaspheme thanks for the info; I guessed that it doesn't need to be checked in; however, I need to have some "official" info in order to submit the PR; I just find it very strange that there is no mention of this anywhere :SRadford
I recently saw a .jfm file in another dev's machine. It was named the same as the SSDT project: path\to\solution\DatabaseProjectName\DatabaseProjectName.jfm. Also interested to know what it is.Magnesite
@Magnesite yup no mention of it in any MS sites and no "special" explanation in VS (e.g. dbmdl is your db model file)Radford
I recently updated Windows 10 to fast ring (Version 10.0.14388) and am getting this file now. If I try to remove it I get an error saying the file is in use. Checking with an unlock tool, it is Visual Studio that has the lock on it.Hallie
I'm on Win 10 preview 14388.0 but VS 2013 and also have this file now.Hotspur
@StephenPrice yes that's right it's VS that locks the file... still no idea what it is and where it came from though...Radford
Is it possible that you have the Team Explorer Everywhere installed for Eclipse? I just remember that they released the IntelliJ stuff recently, so pointing the finger at a random Java normalization process. I haven't seen this myself with VS 2013 or 2015 with the latest SSDT installed.Boisvert
@Boisvert I'm afraid I didn't even know what eclipse is (I do now that I googled it) so I don't think that's it :(Radford
I've updated Windows 10 with anniversary update and I've now this file being generated.Mireillemireles
Adding *.jfm to the .gitignore file seems to fix the issue.Mireillemireles
I'm in the same boat of installing Windows 10 with anniversary and now I've got the file.Toogood
I can confirm I am seeing the new files popping up now. They are blocking my git addSupernal
I have to joke: Did you try uninstalling and resinstalling?Berlinda
+1 Had the issue where no changes at all were showing. Deleting the jfm file from source control via gitbash and adding it to gitignore file fixed the issue after much struggle. Had to close Visual Studio for the git "git rm -rf" to work.. What a nightmare!Visually
@Visually worked for me too. Add *.jfm to .gitignore, thent delete .jfm from remote git repo, discard local changes and sync with remote. Issue fixed.Saree
Does everyone seeing this have the new Ubuntu bash feature in Windows 10 Anniversary turned on? Just wondering.Giulio
Can confirm it doesn't appear to be related to the Ubuntu tools as the devs here don't have that turned on but are still getting these files.Schram
Adding *.jfm to .gitignore doesn't fully work for me and some coworkers. Have to run git rm --cached Database.jfm from gitbash to see changes again, also need to stash changes and checkout branch from gitbash otherwise VS won't let you change branches. Has been a nightmare to work with.Corncob
M
203

This is an issue caused by the ESENT engine relied on by SQL Projects adding in a new file. This is a new feature in Windows 10 Anniversary Edition to avoid data loss, but the fact SQL Projects store the .dbmdl cache file under the project root means this locked file is added to the Git source control.

Notes:

  • A pull request to fix this in GitIgnore has been accepted and the Visual Studio team is working to include this in future updates. This will ensure that for new projects the .gitignore file includes .jfm and the problem will not occur
  • The core SSDT team is working to provide a solution to this in a future update, but for now the best solution is to manually add as discussed in the comments.

Disclosure: I work on the SSDT team for Microsoft.

Md answered 12/9, 2016 at 18:40 Comment(5)
also thank you for finally providing a real answer to what file is!Radford
Sorry about the PR - I had been following up on this issue internally and followed the recommended steps (including doing a PR). I only noticed after I submitted that this post referenced a separate PR and by then they'd basically accepted it! Lesson learned to read StackOverflow posts more carefully :-) By the way, Technocore had the previous answer to this question but it's been deleted for some reason. Thanks for raising this issue and apologies for the inconvenience - we were taken by surprise by the ESENT feature change and still looking to properly fix.Md
No worries mate, the PR stuff was not really that important. Not sure why it got removed; perhaps it wasn't as detailed/accurate as it needed to be for an answer.Radford
I just hit this bug and it took me half a day to figure out what was going on. Seriously, who decided to put the dbmdl in the project root in the first place? Shouldn't it be in /obj or something? I mean, occasionally I have to delete the .dbmdl just to keep SSDT working. It confused the hell out of my team when I explained that "CLEAN" doesn't actually delete this file because it's not in obj, and now the silly dbmdl has destroyed another few hours of my productivity with this jfm nonsense.Artwork
FYI this is in the latest VS .gitgnore now. I just deleted the old one and had VS recreate it and that solved the problem for my team. Just be careful if you have custom entries in your existing file.Gironde
C
90

The takeaway from others is...

  • Add *.jfm to your .gitignore

(In powershell, Add-Content .\.gitignore *.jfm)

  • You may need to run git rm --cached *.jfm
Chian answered 28/4, 2017 at 5:39 Comment(3)
One hundred times YES to this answer. Clear, simple and it worked. As an aside, I gave up on SSDT and sqlproj's a while ago. And this type of problem was exactly why. Now I rely on plain old sql scripts, and custom migrations. Way more manageable and less headaches (which you think would be the opposite).Bunnie
If your .gitignore might not end with a newline use Add-Content .\.gitignore `r`n*.jfm to ensure it ends up on its own line.Christmann
git rm --cached *.jfm really helped. Thank you very much!Positivism

© 2022 - 2024 — McMap. All rights reserved.