Browse Source

Look up xml documentation in reference assemblies folder.

4.0
Daniel Grunwald 14 years ago
parent
commit
9c5bdcc801
  1. 9
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/ReflectionProjectContent.cs
  2. 1
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/XmlDoc.cs

9
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/ProjectContent/ReflectionProjectContent.cs

@ -122,7 +122,14 @@ namespace ICSharpCode.SharpDevelop.Dom @@ -122,7 +122,14 @@ namespace ICSharpCode.SharpDevelop.Dom
LoggingService.Warn(ex);
}
string fileName = XmlDoc.LookupLocalizedXmlDoc(assemblyLocation);
string fileName = null;
if (assemblyLocation != typeof(object).Assembly.Location) {
// First look in the assembly's directory.
// mscorlib is the exception, because it is loaded from the runtime directory (C:\Windows\Microsoft.NET\Framework\v4.0.30319),
// but that might contain an outdated version of mscorlib.xml (with less documented members than the mscorlib.xml in the Reference Assemblies)
// (at least on my machine, lots of others don't seem to have the v4.0.30319\mscorlib.xml at all).
fileName = XmlDoc.LookupLocalizedXmlDoc(assemblyLocation);
}
if (fileName == null) {
// Not found -> look in other directories:
foreach (string testDirectory in XmlDoc.XmlDocLookupDirectories) {

1
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/XmlDoc.cs

@ -15,6 +15,7 @@ namespace ICSharpCode.SharpDevelop.Dom @@ -15,6 +15,7 @@ namespace ICSharpCode.SharpDevelop.Dom
public sealed class XmlDoc : IDisposable
{
static readonly List<string> xmlDocLookupDirectories = new List<string> {
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"),
System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeDirectory()
};

Loading…
Cancel
Save