Menu

#2 hard-coded folder name for xslt file?

open
nobody
None
5
2006-05-01
2006-05-01
budp
No

Apparently ndoc has a hard-coded folder name
'C:\Documenter\Msdn2\xslt\namespace.xslt'.
This folder does not exist.
Tried with two projects and two project types (MSDN
and MSDN 2003).

Error compiling the namespace stylesheet

Exception: NDoc.Core.DocumenterException

Error compiling the namespace stylesheet

Exception: System.Exception

Error compiling the namespace stylesheet

Exception: System.IO.DirectoryNotFoundException

Could not find a part of the path 'C:\Documenter\Msdn2
\xslt\namespace.xslt'.

Exception: NDoc.Core.DocumenterException
at NDoc.Documenter.Msdn2.Msdn2Documenter.Build
(Project _project) in C:\Documents and
Settings\Administrator\Desktop\NDoc2005
\src\Documenter\Msdn2\Msdn2Documenter.cs:line 582

at NDoc.Gui.BuildWorker.ThreadProc() in
C:\Documents and
Settings\Administrator\Desktop\NDoc2005
\src\Gui\BuildWorker.cs:line 88

Exception: System.Exception
at
NDoc.Documenter.Msdn2.StyleSheetCollection.MakeTransfo
rm(String name, XsltResourceResolver resolver) in
C:\Documents and
Settings\Administrator\Desktop\NDoc2005
\src\Documenter\Msdn2\StyleSheetCollection.cs:line 115

at
NDoc.Documenter.Msdn2.StyleSheetCollection.AddFrom
(String name, XsltResourceResolver resolver) in
C:\Documents and
Settings\Administrator\Desktop\NDoc2005
\src\Documenter\Msdn2\StyleSheetCollection.cs:line 96

at
NDoc.Documenter.Msdn2.StyleSheetCollection.LoadStyleSh
eets(String extensibilityStylesheet) in C:\Documents
and Settings\Administrator\Desktop\NDoc2005
\src\Documenter\Msdn2\StyleSheetCollection.cs:line 58

at NDoc.Documenter.Msdn2.Msdn2Documenter.Build
(Project _project) in C:\Documents and
Settings\Administrator\Desktop\NDoc2005
\src\Documenter\Msdn2\Msdn2Documenter.cs:line 406

Exception: System.IO.DirectoryNotFoundException
at System.IO.__Error.WinIOError(Int32 errorCode,
String maybeFullPath)

at System.IO.FileStream.Init(String path, FileMode
mode, FileAccess access, Int32 rights, Boolean
useRights, FileShare share, Int32 bufferSize,
FileOptions options, SECURITY_ATTRIBUTES secAttrs,
String msgPath, Boolean bFromProxy)

at System.IO.FileStream..ctor(String path,
FileMode mode, FileAccess access, FileShare share,
Int32 bufferSize)

at System.Xml.XmlDownloadManager.GetStream(Uri
uri, ICredentials credentials)

at System.Xml.XmlUrlResolver.GetEntity(Uri
absoluteUri, String role, Type ofObjectToReturn)

at NDoc.Core.XsltResourceResolver.GetEntity(Uri
absoluteUri, String role, Type ofObjectToReturn) in
C:\Documents and
Settings\Administrator\Desktop\NDoc2005
\src\Core\XsltResourceResolver.cs:line 138

at
NDoc.Documenter.Msdn2.StyleSheetCollection.MakeTransfo
rm(String name, XsltResourceResolver resolver) in
C:\Documents and
Settings\Administrator\Desktop\NDoc2005
\src\Documenter\Msdn2\StyleSheetCollection.cs:line 105

Discussion

  • johan ville

    johan ville - 2006-05-05

    Logged In: YES
    user_id=907383

    Encountered the same problem.
    However the path does not seem to be hard-coded at C:...
    but at ..\..\Documenter\Msdn\xslt\namespace.xslt relative
    to the location of the NDoc application.
    What is worse: There is no namespace.xslt file in the
    downloaded zip file.
    With other words: I don't get it working!

    P.S.: The error appears as well as in the GUI as in the
    console application.

     
  • Nobody/Anonymous

    Logged In: NO

    You can find all files you need in source archive. Good luck

     
  • Nobody/Anonymous

    Logged In: NO

    The missing files are in the Microsoft HTML Workshop.

     
  • ImJasonH

    ImJasonH - 2006-06-21

    Logged In: YES
    user_id=1539124

    I had the same problem until I downloaded the whole source,
    which included the file(s) you need.

    Download the source and it should work.

     
  • budp

    budp - 2006-06-22

    Logged In: YES
    user_id=1513750

    I was able to run NDoc by downloading the entire source
    file and running it from the debug directory.
    I also had to copy any dlls required by the program being
    documented to the same directory.
    The new NDoc is many times slower than the older NDdoc,
    but seems to work properly under these restrictions.

     
  • Nobody/Anonymous

    Logged In: NO

    Caused by the NORESOURCES compiler directive in the GUI
    project. Remove this from the project properties and this
    should work.

     
  • a_fisher

    a_fisher - 2007-03-23

    Logged In: YES
    user_id=1714734
    Originator: NO

    Line 49 of StyleSheetCollection.cs in Msdn project.

    string resourceBase = "file://" + Path.GetFullPath(Path.Combine(System.Windows.Forms.Application.StartupPath, @"..\..\..\Documenter\Msdn\xslt") );

    The hard coded path points to the correct place if you are in the debug directory, that is why it works running from there.

     
  • a_fisher

    a_fisher - 2007-03-23

    Logged In: YES
    user_id=1714734
    Originator: NO

    Solution below was obviously put there for debugging so removing NO_RESOURCES from compilation symbols of Msdn project is the way to go.

     

Log in to post a comment.

MongoDB Logo MongoDB