Re: Integration with MSBuild

Word-2-CHM Converter

Integration with MSBuild


waspy 12-15-2009, 12:39 PM
Hello All,

We tried integration with MSBuild running with the account we used to register the Word-2-CHM. No luck so far.. it is just hanging doing nothing... What is the way to check the error log? Can Word-2-CHM be integrated with MSBuild?

Regards,
Alex

Re: Integration with MSBuild


Peter 12-15-2009, 8:05 PM
Hi Alex,

Yes, it can.
What is the command line you are using in MSBuild?
Please see online document for using Word-2-CHM command line: http://www.macrobject.com/en/word-2-chm/doc2008/topics/UsingCommandLine.htm

Regards,
Peter

Re: Integration with MSBuild


waspy 12-16-2009, 5:57 AM
Hi Peter,

We've created the following batch file called CompileDocumentation.bat that is called by TFSBuildService:

set word2chm="C:\Program Files (x86)\Macrobject\Word-2-CHM 2009\Word-2-CHM.exe"
%word2chm% /pFile=%1 /pOutPath="C:\Program Files\MyProgram\Help\" /pAuto=true /pOverwrite=true

In MSBuild definition we have the following target:

 <Target Name="GenerateDocumentation">
<BuildStep Message="Compiling Help Projects"
TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
BuildUri="$(BuildUri)"
Condition=" '$(IsDesktopBuild)' != 'true' ">

<Output TaskParameter="Id" PropertyName="HelpGenerationId" />
</BuildStep>

<Exec Command="CompileDocumentation.bat &quot;$(SolutionRoot)\MyProgram\Help\ProgramHelp.word2chm&quot;" />

<!-- If no error, mark this build step as succeeded -->
<BuildStep TeamFoundationServerUrl="$(TeamFoundationServerUrl)"
BuildUri="$(BuildUri)"
Id="$(HelpGenerationId)"
Status="Succeeded"
Condition=" '$(IsDesktopBuild)' != 'true' " />

<OnError ExecuteTargets="HelpGenerationFailed" />
</Target>


When the process starts it invokes the Word application but doesn't produce any output and doesn't terminate.

Kind regards,
Alex

Re: Integration with MSBuild


Peter 12-16-2009, 8:26 AM
Hi Alex,

1. Does the command works in Windows Scheduled Task?
2. Invokes Word-2-CHM in MSBuild without the auto flag. Does it work when you click the Create button?

Regards,
Peter

Re: Integration with MSBuild


waspy 12-17-2009, 1:37 AM
Hello Peter,

Yes eveything works perfectly fine... It only hangs when called from TFSBuildService.

Regards,
Alex

Re: Integration with MSBuild


Peter 12-17-2009, 6:46 AM
We’ll try to test it in the TFS environment.  We’ll get back to you once we get any result.

Regards,
Peter

Re: Integration with MSBuild


waspy 01-04-2010, 2:49 PM
Dear guys,

Are there any updates on the issue?

Regards,
Alex

Re: Integration with MSBuild


Peter 01-05-2010, 1:52 AM
Sorry for the delayed response. We had never used TFS before. It took us some time to create the environment.
Now we have reproduced the problem by invoke MSBuild from a background service.
We are now trying to locate the issue and fix it. Please be patient.

Regards,
Peter

Re: Integration with MSBuild


Peter 01-06-2010, 8:28 PM
We’ve release an update version. It passed the tests in our TFS environment.
Please try it and let us know if the issue is fixed, thank you.

Download it at: http://www.macrobject.com/en/word-2-chm/download.htm

Regards,
Peter

Re: Integration with MSBuild


waspy 01-07-2010, 1:56 AM
Dear Peter,

I have downloaded and installed the latest build 2009.2.107.2268, but the issue still remains (the same behaviour - hanging in memory). I don't see any logs or errors displayed, therefore I can't send you any debugging information unfortunately.

Regards,
Alex

Re: Integration with MSBuild


Peter 01-07-2010, 7:05 AM
Hi Alex,

We have emailed a debug version to you. Please check your email.

Regards,
Peter

Re: Integration with MSBuild


waspy 01-08-2010, 7:22 AM
Dear Peter,

I have send you the logs via e-mail...

Thank you,
Alexei

Re: Integration with MSBuild


Peter 01-09-2010, 7:11 AM
Hi Alexei,

We found an exception in the log file:

-EXP:W12.0.4518,,W1@5,F|Ope,WordUtils0.Close,This command is not available because no document is open

The message says that Microsoft Word cannot find the file and no document is opened.
Where are the .word2chm and the .docx files in? Is the .docx accessible in that situation?
Please try Word-2-CHM command line with /pFile=“the .docx file” directly and let us know the result, thanks.

Best Regards.
Peter L.

Re: Integration with MSBuild


waspy 01-11-2010, 12:23 AM
Dear Peter,

It does work if the source file is a document (unfortunately we use add-ons and custom theme:)). So the problem is pretty clear then...
If Word-2-Chm project has a relative path to the document (all in current directory) and it is called by external application (TFSBuildService in our case) then this path is resolved as relative to the caller, not to the Word-2-Chm project (which is sent as a parameter).

Thank you very much for the great support and looking forward to the fix...

P.S. I think it would be a valuable feature to let the program finish execution and handle all the exceptions logging them in a separate file (otherwise the whole build just hangs). Console mode would be ideal of course...

Regards,
Alexei

Re: Integration with MSBuild


David 01-11-2010, 7:10 AM
Please install the latest version and try again:
  http://www.macrobject.com/en/downloads.htm

Please add /pQuiet=true;Debug=true to the parameter of command line.
 Page 1 of 2 (23 items) 1 2 »

Powered by Community Server, by Telligent Systems