XslTransformer Exception

Dec 18, 2007 at 5:54 AM
Hi

I the following exception when using SHFB to author a .chm help file. I have applied all the presentation patches etc. The exception only occurs if I select to not document Inherited and InheritedFramework members. Any ideas? Thanks.

Sandcastle Help File Builder GUI, version 1.6.0.2
Build started at 18/12/2007 08:51:27 AM

Finding tools...
Found Sandcastle in 'C:\Program Files\Sandcastle\'
Found HTML 1.x help compiler in 'C:\Program Files\HTML Help Workshop\'
Validating documentation assembly information...
-------------------------------
Generating shared content files (en-US, English (United States))...
Last step completed in 00:00:00.0469
-------------------------------
Copying documentation assembly dependencies...
C:\Development\Projects\VStudio 2008\LegitToCommit\Lib\antlr.runtime.dll -> C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\DLL\antlr.runtime.dll
C:\Development\Projects\VStudio 2008\LegitToCommit\Lib\log4net.dll -> C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\DLL\log4net.dll
C:\Development\Projects\VStudio 2008\LegitToCommit\Lib\Spring.Core.dll -> C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\DLL\Spring.Core.dll
C:\Development\Projects\VStudio 2008\LegitToCommit\Src\Bin\LegitToCommit.Infrastructure.dll -> C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\DLL\LegitToCommit.Infrastructure.dll
C:\Development\Projects\VStudio 2008\LegitToCommit\Src\Bin\LegitToCommit.Model.dll -> C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\DLL\LegitToCommit.Model.dll
C:\Development\Projects\VStudio 2008\LegitToCommit\Src\Bin\LegitToCommit.Presenters.dll -> C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\DLL\LegitToCommit.Presenters.dll
C:\Development\Projects\VStudio 2008\LegitToCommit\Src\Bin\LegitToCommit.Repositories.dll -> C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\DLL\LegitToCommit.Repositories.dll
C:\Development\Projects\VStudio 2008\LegitToCommit\Src\Bin\LegitToCommit.ServiceContracts.dll -> C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\DLL\LegitToCommit.ServiceContracts.dll
C:\Development\Projects\VStudio 2008\LegitToCommit\Src\Bin\LegitToCommit.Services.dll -> C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\DLL\LegitToCommit.Services.dll
C:\Development\Projects\VStudio 2008\LegitToCommit\Src\Bin\log4net.dll -> C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\DLL\log4net.dll
Last step completed in 00:00:00.5313
-------------------------------
Generating API filter for MRefBuilder...
Last step completed in 00:00:00.0156
-------------------------------
Generating reflection information...
C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\GenerateRefInfo.bat
MrefBuilder (v2.3.8000.26)
Copyright c Microsoft 2006
Info: Loaded 6 assemblies for reflection and 9 dependency assemblies.
Info: Wrote information on 4 namespaces, 6 types, and 12 members
Last step completed in 00:00:02.5469
-------------------------------
Removing duplicate topics from reflection information file
0 duplicate topics removed
Last step completed in 00:00:00.0000
-------------------------------
Generating namespace summary information...
Last step completed in 00:00:00.0000
-------------------------------
Applying visibility properties to reflection information file
0 explicit interface implementations removed
0 local and base class EII elements removed
30 inherited member elements removed
Last step completed in 00:00:00.0313
-------------------------------
Transforming reflection output...
C:\Development\Projects\VStudio 2008\LegitToCommit\Docs\Help\Working\TransformManifest.bat
XslTransform (v2.3.8000.26)
Copyright c Microsoft 2005-2006
Info: Applying XSL transformation 'C:\Program Files\Sandcastle\ProductionTransforms\ApplyPrototypeDocModel.xsl'.
Info: Applying XSL transformation 'C:\Program Files\Sandcastle\ProductionTransforms\AddGuidFilenames.xsl'.

Unhandled Exception: System.UnauthorizedAccessException: Access to the path 'C:\Documents and Settings\b762161\Local Settings\Temp\tmpE2C.tmp' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.Delete(String path)
at Microsoft.Ddue.Tools.XslTransformer.Main(String[] args)
XslTransform (v2.3.8000.26)
Copyright c Microsoft 2005-2006
Info: Applying XSL transformation 'C:\Program Files\Sandcastle\ProductionTransforms\ReflectionToManifest.xsl'.
Last step completed in 00:00:05.7969


BUILD FAILED: Unexpected error in last build step. See output above for details.

Coordinator
Dec 18, 2007 at 3:04 PM
The error is occurring because XslTransform can't delete one of its temporary files. I doubt it has anything to do with the project options and more to do with permissions on the temporary folders.

Eric
Dec 18, 2007 at 6:02 PM

EWoodruff wrote:
The error is occurring because XslTransform can't delete one of its temporary files. I doubt it has anything to do with the project options and more to do with permissions on the temporary folders.

Eric



Eric

The fact of the matter is that if I do include the inherited and inherited framework members in the doc, the problem disappears. Does the .tmp file not get generated if you select to document inherited members?

Carel
Coordinator
Dec 18, 2007 at 7:13 PM
Edited Dec 18, 2007 at 7:15 PM
XslTransform is part of Sandcastle, I didn't write it so I can't say why it fails without the members as opposed to with them. You can e-mail me the project, assemblies, and XML comments files if you like and I can try to reproduce the error on my system. My e-mail address is in the About box and in the footer of the pages in the help file. If I can, maybe I can get enough to report it as a bug.

Just a though: If you're running on Vista, perhaps run SHFB as administrator. It does launch the scripts to run in the background so perhaps it can't get the necessary permissions it needs.

Eric
Mar 31, 2010 at 5:33 PM

We use the following tools for our build process:

- Build tool Ant
- Continous Integration Server Hudson. The server is installed as windows service on Windows XP 64 Bit.
- .NET Framework 3.5 SP1
- Sandcastle 2.4.10520
- Sandcastle Help File Builder 1.8.0.3

Even though an administrator account is used for the windows service, the following UnauthorizedAccessException occurs if the project option DocumentInheritedFrameworkMembers is set to true:

XslTransform (v2.4.10520.1)
Copyright c Microsoft 2005-2006
Info: Applying XSL transformation 'D:\Hudson\jobs\V5APG\workspace\programs\Sandcastle\ProductionTransforms\ApplyPrototypeDocModel.xsl'.
Info: Applying XSL transformation 'D:\Hudson\jobs\V5APG\workspace\programs\Sandcastle\ProductionTransforms\AddGuidFilenames.xsl'.

Unhandled Exception: System.UnauthorizedAccessException: Access to the path 'D:\Hudson\jobs\V5APG\workspace\workspace\APG_Dialogs\VB.net Solution\V5_APG\doc\Temp\tmp123.tmp' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.Delete(String path)
   at Microsoft.Ddue.Tools.XslTransformer.Main(String[] args)
XslTransform (v2.4.10520.1)
Copyright c Microsoft 2005-2006
Info: Applying XSL transformation 'D:\Hudson\jobs\V5APG\workspace\programs\Sandcastle\ProductionTransforms\ReflectionToManifest.xsl'.
    Last step completed in 00:00:25.3906
</buildStep>
<buildStep step="Failed">

BUILD FAILED: Unexpected error in last build step.  See output above for details.

As a workaround, we set DocumentInheritedFrameworkMembers to false and the exception disappeared!

Here is a list of all test scenarios:

Windows Service + <VisibleItems>InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected</VisibleItems> : System.UnauthorizedAccessException
Windows Service + <VisibleItems>InheritedMembers, Protected, SealedProtected</VisibleItems> : ok
Console + <VisibleItems>InheritedMembers, InheritedFrameworkMembers, Protected, SealedProtected</VisibleItems> : ok
Console + <VisibleItems>InheritedMembers, Protected, SealedProtected</VisibleItems> : ok

Michael