Build Guidance Error

Jan 8, 2015 at 3:16 PM
Edited Jan 9, 2015 at 12:31 PM
Hello,

I'm new to NuPattern and have a problem with building the guidance documentation.
When I try to build it for the pattern I get the error:
NuPattern.Library.Automation.MenuAutomation Error: 0 : Menu automation 'BuildGuidanceOnMenu' failed.
System.InvalidOperationException: Failed to validate document 'C:\Users\lsmeyers\Desktop\Stage\5 Software component\MVC_Framework_Prototype\MVC_Prototype\MVC_Prototype\Assets\Guidance\ToolkitGuidance.doc'.
Error is: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80004023 A Microsoft Software Installer error was encountered. (Exception from HRESULT: 0x80004023). ---> System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80004023 A Microsoft Software Installer error was encountered. (Exception from HRESULT: 0x80004023).
   at NuPattern.Authoring.Guidance.TocGuidanceProcessor.LoadGuidanceDocument(String documentPath)
   at NuPattern.Authoring.Guidance.TocGuidanceProcessor.ValidateDocument()
   --- End of inner exception stack trace ---
   at NuPattern.Authoring.Guidance.TocGuidanceProcessor.ValidateDocument()
   at NuPattern.Authoring.PatternToolkit.Automation.Commands.CreateGuidanceDocumentsCommand.Execute()
   at NuPattern.Library.Automation.CommandAutomation.Execute(IDynamicBindingContext context, Boolean withAutomation)
   at NuPattern.Library.Automation.CommandAutomation.Execute()
   at NuPattern.Library.Commands.AggregatorCommand.Execute()
   at NuPattern.Library.Automation.CommandAutomation.Execute(IDynamicBindingContext context, Boolean withAutomation)
   at NuPattern.Library.Automation.CommandAutomation.Execute()
   at NuPattern.Library.Automation.MenuAutomation.ExecuteCommand()
   at NuPattern.Library.Automation.MenuAutomation.<>c__DisplayClass8.<Execute>b__6()
   at NuPattern.VisualStudio.TraceSourceExtensions.DoShield(ITracer traceSource, Action action, String format, Boolean showUI, String[] args)
I followed the documentation that explains how to fix problems with the guidance but it won't help.
Does someone know what casuses this error and how to fix it?
Coordinator
Jan 11, 2015 at 7:13 PM
I know for sure that you get this kind of error if you try to 'build' the guidance when you still have the word document open in word. (i.e when the file is locked by another program)
Close Word and make sure that 'winword.exe' is not still running in the WIndows 'Task Manager'.
Jan 12, 2015 at 9:43 AM
Hello jezzsa,

I don't have the guidance document open in any kind of text editor and tried closing word completely.
But I still get the same error when trying to build the guidance.
Do you have an idea what else could cause this problem?
Or is there another way to build the guidance for a pattern?
Coordinator
Jan 13, 2015 at 8:00 PM
Hi Raverde,

If you look in the stacktrace, the function that is failing is LoadGuidanceDocument(), all that does is load the document into memory (using stand office automation commands) from disk. It is the thing that is failing. Which indicates there is either something wrong with the document, or somethign wrong with the installation of Word.

There is another clue in the stacktrace it says: "A Microsoft Software Installer error was encountered...".
Perhaps thers is something wrong with the installation of Office/Word? It is impossible for me to figure out what is wrong here.

The only other clue I have to the cause of your issue, is that we know on some 64bit systems, Word does not permit other programs to automate it to do things. (which is what we are doing in NuPattern). And to workaround that you have to set a specific permission (DCOM) to allow NuPattern to process Word documents. The workaround for that is documented in detail the guidance for NuPattern (found in Visual Studio in Solution Builder).

Do you know of any reason why Word is not behaving correctly?
Jan 14, 2015 at 10:24 AM
Hi jezzsa,

I think I will try and instal a clean word or another pc to see if this helps.
I am currently running an 64bit system but already found and followed the documentation this did not change the error.
Until now I haven't had any problems with word so i can't think of any reasons why it wouldn't behave correctly.

If installing a clean word does not work is there a way to manual build the guidance for a pattern?
Coordinator
Jan 15, 2015 at 8:39 AM
Hi Raverde,

As far as building the guidance manually. It would be very tedious, but it is possible.
NuPattern simply shreads the word document at each page boundary into a CHM file.
And then code generates a class called: Workflow (I think) that creates effectively a structured Table Of Contents of the shredded documents, with a hyperlink to teach content file (CHM).

You can of course do all this manually, of even more simply just create your Workflow class to point to other content files (i.e. a web site).

Over and above that, we have resolved to stop using Word and move to OpenXML instead so that other tools (Ohter than Word) can be used to do the same thing. But we have made no progress there yet.

I am afraid we dont have have many people actively helping out the project in this area yet.