使Sql Server数据工具与Visual Studio 2012 Express Release Candidate一起使用

时间:2022-02-03 10:07:38

I'm struggling with migrating to Visual Studio 2012 Express Edition to handle a project that includes a database project with a .dbproj extension. This blog http://visualstudiomagazine.com/blogs/data-driver/2012/06/getting-visual-studio-2012-and-ssdt-to-work-together.aspx gives the impression that with a bit of work this is all basically manageable.

我正在努力迁移到Visual Studio 2012 Express Edition来处理包含扩展名为.dbproj的数据库项目的项目。这篇博客http://visualstudiomagazine.com/blogs/data-driver/2012/06/getting-visual-studio-2012-and-ssdt-to-work-together.aspx给人的印象是,通过一些工作,这是一切都基本可以管理。

First you have to convert the .dbproj to a .sqlproj in Visual Studio 2010.

首先,您必须将.dbproj转换为Visual Studio 2010中的.sqlproj。

I managed to install Visual Studio 2010. This allowed me to convert the .dbproj to a .sqlproj. From there the idea is to install Sql Server Data Tools (http://msdn.microsoft.com/en-us/data/tools.aspx) and open the sqlproj project in Visual Studio 2012, but I was unable to open the sqlproj in Visual Studio 2012.

我设法安装Visual Studio 2010.这允许我将.dbproj转换为.sqlproj。从那里的想法是安装Sql Server数据工具(http://msdn.microsoft.com/en-us/data/tools.aspx)并在Visual Studio 2012中打开sqlproj项目,但我无法打开sqlproj在Visual Studio 2012中。

I've tried the suggested repair from here http://blogs.msdn.com/b/ssdt/archive/2012/06/07/upgrade-issue-to-visual-studio-2012-rc.aspx and also the advice about repairing here http://social.msdn.microsoft.com/Forums/en-US/ssdt/thread/c66c2296-c94e-4f21-993e-7d3090a596a5, but no matter what I do I can't create or open a sqlproj type project in Visual Studio Express 2012 RC for Web. Does anyone know how to resolve this?

我从这里尝试了建议的修复http://blogs.msdn.com/b/ssdt/archive/2012/06/07/upgrade-issue-to-visual-studio-2012-rc.aspx以及建议关于在这里修复http://social.msdn.microsoft.com/Forums/en-US/ssdt/thread/c66c2296-c94e-4f21-993e-7d3090a596a5,但无论我做什么我都无法创建或打开sqlproj在Visual Studio Express 2012 RC for Web中键入项目。有谁知道如何解决这个问题?

UPDATE: This FAQ http://msdn.microsoft.com/en-us/subscriptions/hh322942.aspx makes it clear that you have to work with an SQL Server Database Project in Visual Studio 2010 Shell not in Visual Studio 2010 or 2012 for Web.

更新:此常见问题解答http://msdn.microsoft.com/en-us/subscriptions/hh322942.aspx清楚地表明您必须使用Visual Studio 2010 Shell中的SQL Server数据库项目而不是Visual Studio 2010或2012中的SQL Server数据库项目网页。

My problem now is that I can create a completely new project by importing SQL scripts manually and going from there, but when I open up the .sqlproj file and try to work with that SQL Server Project I get a lot of spurious errors from Stored Procedures which are in fact perfectly valid.

我现在的问题是我可以通过手动导入SQL脚本并从那里创建一个全新的项目,但是当我打开.sqlproj文件并尝试使用该SQL Server项目时,我从存储过程中得到了很多虚假错误这实际上是完全有效的。

1 个解决方案

#1


4  

I got a clear answer from Microsoft here http://social.msdn.microsoft.com/Forums/en-US/ssdt/thread/c66c2296-c94e-4f21-993e-7d3090a596a5

我在这里得到了一个明确的答案http://social.msdn.microsoft.com/Forums/en-US/ssdt/thread/c66c2296-c94e-4f21-993e-7d3090a596a5

Visual Studio Express 2012 for Web does not support the new Sql Server Data Tools. To work with a database project (converting from the old dbproj or creating a new project from scratch), you have to use Visual Studio 2010 Shell. The errors I got from Stored Procedures were caused because the sql scripts were not properly imported. The old dbproj had the sql scripts in arbitrary folders. The solution was to exclude all sql scripts from the project I had just converted from a dbproj, then re-import the sql scripts. When you do that, the project recognises them and doesn't raise errors.

Visual Studio Express 2012 for Web不支持新的Sql Server数据工具。要使用数据库项目(从旧的dbproj转换或从头开始创建新项目),必须使用Visual Studio 2010 Shell。我从存储过程中获得的错误是由于未正确导入sql脚本引起的。旧的dbproj在任意文件夹中都有sql脚本。解决方案是从我刚刚从dbproj转换的项目中排除所有sql脚本,然后重新导入sql脚本。当您这样做时,项目会识别它们并且不会引发错误。

#1


4  

I got a clear answer from Microsoft here http://social.msdn.microsoft.com/Forums/en-US/ssdt/thread/c66c2296-c94e-4f21-993e-7d3090a596a5

我在这里得到了一个明确的答案http://social.msdn.microsoft.com/Forums/en-US/ssdt/thread/c66c2296-c94e-4f21-993e-7d3090a596a5

Visual Studio Express 2012 for Web does not support the new Sql Server Data Tools. To work with a database project (converting from the old dbproj or creating a new project from scratch), you have to use Visual Studio 2010 Shell. The errors I got from Stored Procedures were caused because the sql scripts were not properly imported. The old dbproj had the sql scripts in arbitrary folders. The solution was to exclude all sql scripts from the project I had just converted from a dbproj, then re-import the sql scripts. When you do that, the project recognises them and doesn't raise errors.

Visual Studio Express 2012 for Web不支持新的Sql Server数据工具。要使用数据库项目(从旧的dbproj转换或从头开始创建新项目),必须使用Visual Studio 2010 Shell。我从存储过程中获得的错误是由于未正确导入sql脚本引起的。旧的dbproj在任意文件夹中都有sql脚本。解决方案是从我刚刚从dbproj转换的项目中排除所有sql脚本,然后重新导入sql脚本。当您这样做时,项目会识别它们并且不会引发错误。