I have just upgraded Visual Studio from 2017 to 2017.3. Now when I try to build I get this error on my database project:
Error: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.3\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Also, tried to find "Microsoft\VisualStudio\v15.3\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe.Config". Confirm that the path in the declaration is correct, and that the file exists on disk in one of the search paths. C:\Users\Ian\Documents\Maslow\Maslow\Database\Database.sqlproj
Note that this path includes v15.3. The files are available, but the folder is called v15.0.
If I edit my Database.sqlproj it contains the line:
<SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists>
Note the user of the $(VisualStudioVersion) variable.
I could hard code that to 15.0, but then it will break for anyone using a different version of Visual Studio. How can I resolve this problem in a way that won't create new problems for other users?