Can't check in .mdf/.ldf in App_Data into TFS

后端 未结 2 1087
南笙
南笙 2021-01-14 03:58

I am working with ASP.NET C# MVC 5.

.mdf/.ldf files in App_Data do not appear on Pending Changes in team explorer. Therefore I can\'t check them into TFS(visual stud

2条回答
  •  暖寄归人
    2021-01-14 04:35

    This is a general question. As already answered by 'Ty Morrow' in above comment there is an initial Seed Method in Entity Framework which ensures that all values are inserted. However there are many scenarios that you also need to work with the latest added / removed DB entries not present in the seed method.

    Please perform the following steps to ensure that your data directory file is included in the source control.

    • Click App_Data folder and on encircled toolbar click on Show All Files as shown below in the snapshot

    • Right Click on your MDF (Data Source) File and click on Include in Project
    • Right Click again on your MDF File and click on Include in Source Control
    • Simply Check in the file by Right Clicking on root project folder link and file show be now part of Source Control

提交回复
热议问题