Having upgraded to Visual Studio 2013, I have found that an old SQL project fails to load when I attempt to open a solution. The error displayed is:
The imported project "C:\Program Files (x86)\MSBuild\12.0\bin\SqlServer.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:\Some\Path\To\Project\Database.sqlproj
In my .sqlproj
file I have the line
<Import Project="$(MSBuildToolsPath)\SqlServer.targets" />
which in Visual Studio 2012 resolves to C:\Windows\Microsoft.NET\Framework\v4.0.30319\SqlServer.targets
but in Visual Studio 2013 this resolves to C:\Program Files (x86)\MSBuild\12.0\bin\SqlServer.targets
. However, the SqlServer.targets
file is in neither of these locations.
Presumably this is due to MSBuild becoming part of Visual Studio, rather than it being part of the .Net Framework.
Does anyone know how to fix this issue and to migrate this project to Visual Studio 2013?
SqlServer.targets
from a machine which has not yet upgraded to Visual Studio 2013 and placing it in the$(MSBuildToolsPath)
directory (`C:\Program Files (x86)\MSBuild\12.0\bin` in my case). Is there a better solution than this? – Exploration