visual studio – VS 2019 SqlBuildTask failed unexpectedly 04018 Error after renaming projects and folders


Sometimes, when I do code cleaning, I happen to rename my solutions and projects.
Usually I also rename folders on disk to keep it in line.
I know that I need to edit the sln file to put in the renamed folders, so the solution can find the projects.
Usually all goes smoothly, but once after such renaming, I could not build my SSDT solution.
I got the:

04018 Error – SqlBuildTask failed unexpectedly …

(with no further error details)

I tried:

  • restarting VS
  • unload / reload projects
  • rebuild (one by one)

Some of the base projects did rebuild ok, but others did not.
Actually – I already have an answer, that worked … so someone can find it useful.

It helped when I deleted all *.dbmdl and *.jfm files within solution folder/subfolders, and then restarted VS and rebuild.

Leave a Reply

Your email address will not be published. Required fields are marked *