无法将数据源拖动到控件进行绑定 [英] Unable to drag data source to control to bind

查看:143
本文介绍了无法将数据源拖动到控件进行绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的测试应用程序,遵循
http://的说明msdn.microsoft.com/en-us/library/dd465159.aspx
。 当我尝试将数据源拖到设计图面上时,我收到以下错误:


无法将控件添加到设计图面或绑定到控件,因为TestApp.AdventureWorksEntities类型不能。解决 请尝试构建项目或添加必要的程序集引用。


已构建的项目和数据源位于同一名称空间中。 我搜索了这个错误,我发现的唯一一个就是这里,并提到了Tools-> Options-> Extension Manager,'Load per use extensions ...'。 选中此选项。 
我尝试取消选中并以相同的行为重新启动。


任何想法?


 

解决方案

我知道这是一个旧帖子,但我遇到了同样的问题,无法在任何地方找到答案。


<然后通过尝试一些东西我找到了答案!


当我安装VS2010时,它似乎将defualt项目文件夹设置为我工作网络上为我保留的空间。一旦我在本地驱动器上创建了一个项目(安装了Visual Studio),它工作正常。


这可能无法解决您的特定问题,但我认为我应该回复,因为似乎没有在旧的互联网上做多了: - )


I have a simple test application following the directions from http://msdn.microsoft.com/en-us/library/dd465159.aspx .  When I attempt to drag the data source onto the design surface I get the following error:

Cannot add the control to the design surface or bind to the control because the type TestApp.AdventureWorksEntities cannot be resolved.  Please try to build the project or add necessary assembly references.

The project as been built and the data source is in the same namespace.  I did a search for this error and the only hit I found was here, and mentioned Tools->Options->Extension Manager, 'Load per use extensions...'.  This option is checked.  I've tried unchecking and restarted with the same behavior.

Any ideas?

 

解决方案

I know this is an old post but I had this very same problem and could not find an answer for it anywhere.

Then by trying something out I found the answer!

It would seem that when I installed VS2010 it set the defualt project folder to a space reserved for me on my work's network. Once I created a project on the local drive (where Visual Studio was installed) it worked fine.

This may not solve your particular problem but I thought I should reply since there doesn't seem to be much on this on the old internet :-)


这篇关于无法将数据源拖动到控件进行绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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