Visual Studio 2015 - Add new data source

2019-07-16 11:27发布

I need to create a new data source starting from a custom object.

This seems possible in Visual Studio 2015 as stated here , but I can't find the Project > Add New Data Source menu entry.

I also tried:

  • this answer but the stated menu entry does not exist in VS2015 and the key shortcut just expands the Debug menu

  • updating VS2015 to Update 3 enabling all components that seemed relevant to the matter

  • creating a custom dataset, but VS always asks me for a DB connection

So far no luck in finding that dialog. Did anyone find it somewhere?

Thanks in advance for every advice!

2条回答
可以哭但决不认输i
2楼-- · 2019-07-16 12:08

Try View -> Database Explorer. And in the database explorer, right click in some empty space and click Add Connection.

View -> Database Explorer

查看更多
迷人小祖宗
3楼-- · 2019-07-16 12:27

I found the solution in this answer.

You simply cannot add an object data source to web-type projects. Instead, you must create an intermediate class library project in which you create the data source and then reference this new project in the web project.

Hope this helps!

查看更多
登录 后发表回答