11

I am trying to build a database project where I was trying to create a system-versioned table within my Visual Studio 2017 solution, but I am suddenly getting an error:

SQL46010: Incorrect syntax near ]

Normally, that would be a simple fix....except the file it refers to doesn't exist! When I double-click the error within the Error List, I get:

Cannot find file 'MSSQL::dbo.TestHISTORY'

The table it refers to is one that I had named as part of the SYSTEM_VERSIONING = ON (minus the MSSQL:: prefix) command for another table I created. I have restarted Visual Studio, reverted all the changes I made to the database project, restarted my PC, performed a Clean operation against the project but all to no avail!

Has anyone else come up against this error?

1 Answer 1

16

I managed to fix this problem by deleting the .jfm and .dbmdl files from the root directory for the database project. After restarting Visual Studio the database project would finally build!

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, this worked for me as well. Odd that the 'Clean' operation doesn't clean up those files. I see they are ignored by the recommended .gitignore, so deleting the directory and re-cloning should also work.
JFM, MDL should be temporary files, ignored by Git. The .jfm file is a journal file used internally by Visual Studio to manage and track the state of changes made to the database project. The .mdl file is a schema model file that contains a compiled version of the database schema. Source: learn.microsoft.com/en-us/answers/questions/341970/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.