Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which files are used by a program?

I have written a program on Visual Basic. In the debug folder, there are many files:

  • Database1.mdf
  • Database1_log.ldf
  • MyData.Designer.vb
  • MyData.xsc
  • MyData.xsd
  • MyData.xss
  • WindowsApplication1.exe
  • WindowsApplication1.config
  • WindowsApplication1.pdb
  • WindowsApplication1.vshost
  • WindowsApplication1.vshost.exe
  • WindowsApplication1.vshost.exe.manifest
  • WindowsApplication1.xml

I want to publish my program. Are all of those files necessary for the program? Which of them are used for my database?

Because I want to put a button in my program that backs up the database. Which files must be backed up?

like image 992
Rose_The_Only Avatar asked Sep 15 '25 21:09

Rose_The_Only


2 Answers

First of all, you should publish the Release version of your software, not the debug version so the files will be a bit different. As for which files to publish, if you use the Setup project you will be able to select the files based upon what your application needs. For example, it looks like you are including database files with your application (Database1.mdf and Database1_log.ldf). You could add these files to the setup project.

The setup project will know to include your exe and your config file (unless you tell it not to) so you will be covered there. Here is a video and a written walkthrough of how to create a Setup project:

http://msdn.microsoft.com/en-us/library/ms241903.aspx

http://www.youtube.com/watch?v=Lcue0jo41AM

As for your PDB files, these are the Program Database Files that are used for debugging (and should never be give to the customer/end user).

http://msdn.microsoft.com/en-us/library/ms241903.aspx

As for backing up your database, back up the MDF and LDF files.

like image 59
IAmTimCorey Avatar answered Sep 17 '25 12:09

IAmTimCorey


No, all of the files above are from your debug compile output. You can change what is output by changing your build configuration. Go to Build, Configuration Manager and switch to Release. It's also on the toolbar.

In general your ProjectName.exe (but not the .vshost.exe), .config (but not the .vshost.exe.config) and MDF/LDF files are needed for publishing. You also have an XSD File which will also be needed.

The MDF/LDF files are your database.

like image 32
Kevin LaBranche Avatar answered Sep 17 '25 14:09

Kevin LaBranche