I am distributing a .netfx2 application (vb.net) using click-once
deployment. How can I deploy my online-help file *.chm together with the rest
of the applicaton files?
--
Harry Solsem
Systems Developer
Umoe Mandal
Norway
I had the same problem and could not find a good method so I used a hack. It
seems that VS2005 will not publish a CHM file but will publish a TXT file OK.
I renamed my Help.CHM to Help.CHM.TXT and then renamed it on first usage at
the client app. Here is the code I used...
string exeFileName = Application.ExecutablePath;
string exeFileNameStub = exeFileName.ToUpper()
.Replace(@"\TIMEX.EXE", @"\");
string helpFileNameAsPublished = exeFileNameStub
+ @"Help\Timex.chm.txt";
string helpFileName = exeFileNameStub + @"Help\Timex.chm";
FileInfo helpFileAsPublished = new FileInfo
(helpFileNameAsPublished);
FileInfo helpFile = new System.IO.FileInfo
(helpFileName);
if (!helpFile.Exists)
{
if (! helpFileAsPublished.Exists)
{
MessageBox.Show("Help request cannot be actioned
because help file is missing - contact
support!", "Help file is missing");
return;
}
helpFileAsPublished.MoveTo(helpFileName);
}
Help.ShowHelp(this, helpFileName);