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...

The Bearded Llama
  • 3,036
  • 4
  • 20
  • 31
  • I just created database project in VS 2015. It doesn't seem to be there, even after i compile project. – Ameya Jun 08 '16 at 13:59
  • it wasn't for me either; it just appeared a couple of days ago like I said – The Bearded Llama Jun 08 '16 at 17:06
  • 1
    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. – ChrisTorng Jun 22 '16 at 02:32
  • 1
    @ChrisTorng 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 :S – The Bearded Llama Jun 22 '16 at 09:24
  • 1
    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. – gabrielmaldi Jun 22 '16 at 22:01
  • 1
    @gabrielmaldi yup no mention of it in any MS sites and no "special" explanation in VS (e.g. dbmdl is your db model file) – The Bearded Llama Jun 23 '16 at 10:15
  • 1
    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. – Stephen Price Jul 15 '16 at 14:16
  • 1
    I'm on Win 10 preview 14388.0 but VS 2013 and also have this file now. – jocull Jul 15 '16 at 15:34
  • 1
    @StephenPrice yes that's right it's VS that locks the file... still no idea what it is and where it came from though... – The Bearded Llama Jul 15 '16 at 17:31
  • 1
    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. – nschonni Jul 23 '16 at 02:20
  • 1
    @nschonni 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 :( – The Bearded Llama Jul 25 '16 at 09:16
  • 61
    I've updated Windows 10 with anniversary update and I've now this file being generated. – Fabian Vilers Aug 03 '16 at 07:51
  • 17
    Adding *.jfm to the .gitignore file seems to fix the issue. – Fabian Vilers Aug 03 '16 at 08:03
  • 1
    I'm in the same boat of installing Windows 10 with anniversary and now I've got the file. – Robert Paulsen Aug 05 '16 at 15:08
  • 1
    I can confirm I am seeing the new files popping up now. They are blocking my git add – Louie Bao Aug 07 '16 at 00:33
  • 4
    I have to joke: Did you try uninstalling and resinstalling? – pookie Aug 17 '16 at 20:13
  • 3
    +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! – Noobie3001 Aug 24 '16 at 09:09
  • 2
    @Noobie3001 worked for me too. Add *.jfm to .gitignore, thent delete .jfm from remote git repo, discard local changes and sync with remote. Issue fixed. – Ivan G. Aug 25 '16 at 13:00
  • Does everyone seeing this have the new Ubuntu bash feature in Windows 10 Anniversary turned on? Just wondering. – James World Sep 07 '16 at 10:05
  • 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. – elexis Sep 08 '16 at 01:12
  • 1
    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. – JasonH Sep 09 '16 at 19:23

2 Answers2

201

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.

Tim Abell
  • 11,186
  • 8
  • 79
  • 110
Kevin Cunnane
  • 8,020
  • 1
  • 32
  • 35
  • also thank you for finally providing a real answer to what file is! – The Bearded Llama Sep 13 '16 at 08:25
  • 1
    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. – Kevin Cunnane Sep 13 '16 at 16:38
  • 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. – The Bearded Llama Sep 14 '16 at 07:56
  • 8
    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. – Pxtl Dec 04 '16 at 20:21
  • 2
    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. – Gabe Nov 07 '17 at 19:43
89

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
emragins
  • 4,607
  • 2
  • 33
  • 48
  • 2
    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). – pim Nov 08 '17 at 16:30
  • 1
    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. – Codespaced Feb 28 '19 at 15:36
  • git rm --cached *.jfm really helped. Thank you very much! – Valeriy Lyuchyn Mar 28 '19 at 15:54