Access to the path '_CodeSnippets_.xml' is denied."

Topics: User Forum
Sep 2, 2008 at 4:59 PM
Hi,

When I click on the button "NameSpace" in the interface, it crashes with the error message "System.UnauthorizedAccessException: Access to the path '_CodeSnippets_.xml' is denied."
(The complete message can be found bellow)

I have been looking for this file '_CodeSnippets_.xml' everywhere on my PC and I don't find it :(

I have been playing a bit with the conceptual help files one month ago, in a test project, and it was working fine.
But I am not currently using any conceptual files in any of my "concrete" shfb files (I have deleted the local copy of my test project).
And the crash happens for all of my shfb files.

Notice also that I can build the shfb files without any problem. It's only when I want to edit the NameSpaces that it crashes...

Any idea how to fix this problem ???

------------------------------------------------------------------------------------------------------------------------
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.UnauthorizedAccessException: Access to the path '_CodeSnippets_.xml' is denied.
   at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive)
   at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive)
   at SandcastleBuilder.NamespacesDlg.NamespacesDlg_FormClosing(Object sender, FormClosingEventArgs e)
   at System.Windows.Forms.Form.OnFormClosing(FormClosingEventArgs e)
   at System.Windows.Forms.Form.CheckCloseDialog(Boolean closingOnly)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
SandcastleBuilderGUI
    Assembly Version: 1.7.0.0
    Win32 Version: 1.7.0.0
    CodeBase: file:///C:/Program%20Files/EWSoftware/Sandcastle%20Help%20File%20Builder/SandcastleBuilderGUI.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
SandcastleBuilder.Utils
    Assembly Version: 1.7.0.0
    Win32 Version: 1.7.0.0
    CodeBase: file:///C:/Program%20Files/EWSoftware/Sandcastle%20Help%20File%20Builder/SandcastleBuilder.Utils.DLL
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
3jpioejd
    Assembly Version: 1.7.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
7yzh0vz0
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
x5jbuslq
    Assembly Version: 1.7.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Coordinator
Sep 3, 2008 at 1:10 AM
Edited Sep 3, 2008 at 1:11 AM

It appears to be failing when it goes to delete the temporary folder used for the partial build.  You can probably delete it manually to see if that corrects the issue.  You can find it in your temporary files folder.  This will vary based on the OS but if you open a command prompt and type SET and hit Enter, you can use the value from the TMP or TEMP environment variable to locate it.  Beneath it, you should find a SHFBPartialBuild folder which contains the files.  Deleting it should fix the problem.

Eric

 

Sep 3, 2008 at 9:08 AM
Edited Sep 3, 2008 at 9:16 AM
Great! That was the problem.

I have no idea why the folder %TEMP%\SHFBPartialBuild was locked. I got indeed several times the error "access denied" while trying to delete it.
I finally succeeded by deleting the content from a command dos (DEL /Q) and then deleting the folder...

Thx again for you help!

V.

PS.: Notice that I have from time to time shfb build failure due to html files that can't be opened. If I rebuild immediately, it often passes. So, I suspect the Antivirus to lock the files and sometime not releasing them fast enough :(
Dec 22, 2008 at 7:53 AM
Hi,

FYI:
I had the same issue (Sandcastle Help File Builder GUI 1.7.0.0).
But my build just fails, it didn't crash.

The file is no longer in the temp folder but in the "Working" folder in your project.
When I deleted it, the build succeeded.

Feb 10, 2009 at 9:14 AM
I also had the same symptoms (and resolution) as obiwanjacobi

All the best, Harvey