Service-Based Database File Missing

感情迁移 提交于 2021-02-05 07:49:26

问题


So I've been having problems with this tutorial for SQL on the MDSN website. The first picture says what it should like to add a new file to the project but when I try to repeat the instruction on VS the service based database file is missing. Does anybody know what I should do?



回答1:


Please try to this way:

Go to Control Panel -> Uninstall a Program, select Visual Studio 201x, right click, Change -> Modify, and check whether you have installed "Microsoft SQL Server Data Tools", if you didn't install it, please check it and follow the steps to install it.

If you have installed it, to make sure whether it is related to your corrupted templates, please take the following steps to reset your templates:

  1. Open Windows Explorer, and navigate to \Common7\IDE (by default is C:\Program Files or Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE);

  2. Delete the ItemTemplatesCache, ProjectTemplatesCache folder;

  3. Open Visual Studio Command Prompt under Start menu -> All Programs -> Microsoft Visual Studio -> Visual Studio Tools (run it with administrative privilege);

  4. Run the devenv /InstallVSTemplates switch;

  5. Run the devenv /Setup switch;

Hope this information is helpful.




回答2:


I found out that you can't. Service Based Databases are for WinForms projects only and aren't available for Windows Universal Projects.

But you can use SQLite for UWP projects. The download is here



来源:https://stackoverflow.com/questions/36590773/service-based-database-file-missing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!