无法将存储过程拖到dbml Designer上 [英] Can't drag stored procedure onto dbml designer

查看:98
本文介绍了无法将存储过程拖到dbml Designer上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从C#应用程序对数据库存储过程进行简单的调用.

I'm trying to do a simple call to a database stored procedure from a C# application.

我正在遵循这样的指南,例如这本这一个.

I'm following a guide like, e.g., this one or this one.

这两个步骤都具有相同的基本步骤.

Both of these have the same basic steps.

  1. 将LINQ to SQL .dbml项目添加到我的项目中
  2. 在服务器资源管理器中连接到数据库
  3. 将存储过程从服务器资源管理器拖到我的.dbml设计器窗口中

但是步骤3不起作用.我有存储过程和设计器窗口,但无法拖动存储过程.我没有加号或不允许"号.这只是一个不可拖动的对象.

But step 3 doesn't work. I have my stored procedure and my designer window, but I can't drag the sproc. I don't get a plus sign, or a "not allowed" sign. It's just a non-dragable object.

我找不到将我的存储过程添加到.dbml文件中的另一种方法.我找不到其他遇到这个问题的人.每个消息来源都只是说要拖过去.

I can't find another way to add my sproc to the .dbml file. And I can't find anyone else who has had this problem. Every source simply says to drag it over.

我在这里怎么可能做错了?

What could I be doing wrong here?

屏幕截图:

推荐答案

原来的解决方案是我为Visual Studio安装的.dll版本错误.

Turns out the solution was that I had the wrong version of a .dll for Visual Studio.

我注意到在服务器资源管理器中执行操作时遇到异常.谷歌搜索例外导致此问题指向该dll

I noticed I was getting exceptions when performing actions in the Server Explorer. Googling the exceptions led to this question which points to this dll

C:\Program Files (x86)\Common Files\microsoft shared\Visual Database Tools\dsref80.dll

作为问题.

我用一个队友的相应副本替换了它,现在可以正常工作了.

I replaced it with the corresponding copy from one of my teammates and it now works fine.

这篇关于无法将存储过程拖到dbml Designer上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆