0

In the first installation in my WPF application I checked if the SQL database for my application exist or not, If not the application restore it from .bak SQL file.

When I publish my application I can't attach (Embed) the .bak file.

How can I do that ?

Thanks in advance

Abdusalam

Abdulsalam Elsharif
  • 4,773
  • 7
  • 32
  • 66

1 Answers1

0

Well .. I got the solution :

One good way of doing this is:

  • Create a folder under the app in VS name e.g. "datafiles"
  • Add all files to that folder using Add as link in the dialog box after selecting Add existing item on the folder
  • Mark all files as Copy if newer (Copy to output directory property)
  • Make sure the build action is content --> when you publish the files will be put in that folder and be a part of the application installation

Good luck!

Source

Community
  • 1
  • 1
Abdulsalam Elsharif
  • 4,773
  • 7
  • 32
  • 66