I have included 2 pdf files in my Project. I have set their property to embedded resource. and copy to output directory to: copy allways.
I list them up in a listbox using the code:
When I build the project the files are in the list and it all works great, but when I publish the project and install it, the files does not appear in the list anymore, why is that and how can I make them follow in the publish and insallation of the program in a way that they will appear in my list after I hav installed it??
I list them up in a listbox using the code:
VB.NET:
Public Sub FillList()
Dim folderInfo As New IO.DirectoryInfo(My.Application.Info.DirectoryPath)
Dim arrFilesInFolder() As IO.FileInfo
Dim fileInFolder As IO.FileInfo
arrFilesInFolder = folderInfo.GetFiles("*.pdf")
For Each fileInFolder In arrFilesInFolder
ListBox1.Items.Add(fileInFolder.Name)
Next
End Sub
When I build the project the files are in the list and it all works great, but when I publish the project and install it, the files does not appear in the list anymore, why is that and how can I make them follow in the publish and insallation of the program in a way that they will appear in my list after I hav installed it??