在开发 Blazor 服务器应用程序时,我无法在 Visual Studio 2019 的新项目中找到.mdf
文件类型。
For whatever it's worth... this is what I did to add an mdf database file to my Visual Studio 2019
solution:
First I had to install this nuget
package: Microsoft.SqlServer.Compact
Then I added the mdf file to the solution
like this:
To view and update the mdf database - open the Server Explorer
You can use the following steps:
To add .mdf files you should have selected .NET desktop development and Data storage and processing while installation of visual studio 2019.
if you have not selected then you need to launch Visual Studio launcher and choose to modify and select it.
After updation you should see .mdf file option while adding a new item in any project.
Note: this option you will see if you add a .Net Framework project but .netcore. But once you add the file , it can be moved to any type of project.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.