I have several SSDT projects in VS2013 and find myself increasingly interrupted by an annoying build issue for which my online searches have yielded no answers.
Generally these SSDT projects build as expected. However, lately a seemingly random build issue arises sometimes, affecting only one or more SSDT projects - none of the ~50 C# projects in my solution: SSDT fails to find the projects' files because it looks for them in other projects' directories.
For example, here is the output for an SSDT build snagged by this issue, followed by a build of the same SSDT project with the issue cleared (simply by closing and re-opening Visual Studio...or rebooting my machine when that does not work - i.e. no code changes):
Failed Build
------ Build started: Project: MyOrg.SomeSolution.Database, Configuration: Debug Any CPU ------
C:\SCC\SomeSolution\trunk\Database\Source\Scripts\Script.PostDeployment.sql(25,4): Error: SQL72001: The included file SomeTable.data.sql (C:\SCC\SomeSolution\TRUNK\COMPONENTS\SOMECATEGORY\FOO\FOO.UNIT.TESTS\SCRIPTS\SOMETABLE.DATA.SQL) does not exist.
Done building project "MyOrg.SomeSolution.Database.sqlproj" -- FAILED.
Build FAILED.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
Build Summary
-------------
00:00.506 - Failed - Debug Any CPU - Database\Source\MyOrg.SomeSolution.Database.sqlproj
Total build time: 00:56.948
========== Build: 0 succeeded or up-to-date, 1 failed, 52 skipped, Completed at 4/24/2014 3:12:01 PM ==========
Publish cannot begin until your project is ready to build. Try again after resolving any errors in the project.
Successful Build
------ Build started: Project: MyOrg.SomeSolution.Database, Configuration: Debug Any CPU ------
MyOrg.SomeSolution.Database -> C:\SCC\SomeSolution\trunk\Database\Build\Scripts\MyOrg.SomeSolution.Database.dll
MyOrg.SomeSolution.Database -> C:\SCC\SomeSolution\trunk\Database\Build\Scripts\MyOrg.SomeSolution.Database.dacpac
C:\SCC\SomeSolution\trunk\Database\Build\PostBuild.bat
Generating publish script for database '_TheDatabase_' on server 'localhost'.
Successfully generated script to file C:\SCC\SomeSolution\trunk\Database\Build\Scripts\MyOrg.SomeSolution.Database.sql.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
Build Summary
-------------
00:10.928 - Success - Debug Any CPU - Database\Source\MyOrg.SomeSolution.Database.sqlproj
Total build time: 00:00.000
========== : 1 succeeded or up-to-date, 0 failed, 52 skipped, Completed at 4/24/2014 3:16:11 PM ==========
While the build output above is in the context of publishing, building independent of publishing yields the same results when the issue hits.
Finally, I sense that this issue may arise after Visual Studio detects outside changes to my solution, its projects, and/or their files, then reloads them at my direction; but this is not a hypothesis I have (dis)confirmed with focused experimentation, rather just a suspicion I have developed in the course of my work.
Has anyone else encountered this issue and found a way to squash it?