Project fails to load due to missing SqlServer.targets file after upgrading to Visual Studio 2013(升级到 Visual Studio 2013 后,由于缺少 SqlServer.targets 文件,项目无法加载)
问题描述
升级到 Visual Studio 2013 后,我发现在尝试打开解决方案时无法加载旧的 SQL 项目.显示的错误是:
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:
未找到导入的项目C:Program Files (x86)MSBuild12.0inSqlServer.targets".确认声明中的路径正确,并且该文件存在于磁盘上.C:SomePathToProjectDatabase.sqlproj
The imported project "C:Program Files (x86)MSBuild12.0inSqlServer.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. C:SomePathToProjectDatabase.sqlproj
在我的 .sqlproj
文件中,我有一行
In my .sqlproj
file I have the line
<Import Project="$(MSBuildToolsPath)SqlServer.targets" />
在 Visual Studio 2012 中解析为 C:WindowsMicrosoft.NETFrameworkv4.0.30319SqlServer.targets
但在 Visual Studio 2013 中解析为 C:Program文件 (x86)MSBuild12.0inSqlServer.targets
.但是,SqlServer.targets
文件不在这些位置.
which in Visual Studio 2012 resolves to C:WindowsMicrosoft.NETFrameworkv4.0.30319SqlServer.targets
but in Visual Studio 2013 this resolves to C:Program Files (x86)MSBuild12.0inSqlServer.targets
. However, the SqlServer.targets
file is in neither of these locations.
这可能是因为 MSBuild 成为 Visual Studio 的一部分,而不是它成为 .Net Framework 的一部分.
Presumably this is due to MSBuild becoming part of Visual Studio, rather than it being part of the .Net Framework.
有谁知道如何解决这个问题并将这个项目迁移到 Visual Studio 2013?
Does anyone know how to fix this issue and to migrate this project to Visual Studio 2013?
推荐答案
我在VS 2013下尝试构建VS 2010解决方案时遇到了同样的问题.解决方法是先将解决方案文件升级到VS 2013.之后,它无需进一步修改即可工作.
I had the same problem when trying to build a VS 2010 solution under VS 2013. The fix was to upgrade the solution file to VS 2013 first. After that it worked without further modifications.
这篇关于升级到 Visual Studio 2013 后,由于缺少 SqlServer.targets 文件,项目无法加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:升级到 Visual Studio 2013 后,由于缺少 SqlServer.targets 文件,项目无法加载
基础教程推荐
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01