Author: ankit
Date: 2007-05-31 15:59:22 -0400 (Thu, 31 May 2007)
New Revision: 78372

Modified:
   trunk/monodevelop/Core/src/MonoDevelop.Components/ChangeLog
   trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components.mdp
   trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog
   
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/SystemAssemblyService.cs
   trunk/monodevelop/Core/src/MonoDevelop.Documentation/ChangeLog
   
trunk/monodevelop/Core/src/MonoDevelop.Documentation/MonoDevelop.Documentation.mdp
   trunk/monodevelop/Extras/prj2make-sharp-lib/ChangeLog
   trunk/monodevelop/Extras/prj2make-sharp-lib/MSBuildFileFormat.cs
Log:
In Extras/prj2make-sharp-lib:

        * MSBuildFileFormat.cs (ReadItemGroups): If reference name cannot be
        resolved, then try to find the correct case for the assembly name.
        (AssemblyNamesTable): New.

In Core/src/MonoDevelop.Components:

        * MonoDevelop.Components.mdp: Change runtime to 2.0 .

In Core/src/MonoDevelop.Documentation:

        * MonoDevelop.Documentation.mdp: Change runtime to 2.0 .

In Core/src/MonoDevelop.Core:

        * MonoDevelop.Core/SystemAssemblyService.cs (assemblyFullNameToPath):
        Change type from Hashtable to Dictionary<string,string>.
        (GetAssemblyFullNames): New.


Modified: trunk/monodevelop/Core/src/MonoDevelop.Components/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Components/ChangeLog 2007-05-31 
19:54:14 UTC (rev 78371)
+++ trunk/monodevelop/Core/src/MonoDevelop.Components/ChangeLog 2007-05-31 
19:59:22 UTC (rev 78372)
@@ -1,3 +1,7 @@
+2007-06-01  Ankit Jain  <[EMAIL PROTECTED]>
+
+       * MonoDevelop.Components.mdp: Change runtime to 2.0 .
+
 2007-05-25  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Components.DockToolbars/ArrowWindow.cs: Fix warning.

Modified: 
trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components.mdp
===================================================================
--- 
trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components.mdp    
    2007-05-31 19:54:14 UTC (rev 78371)
+++ 
trunk/monodevelop/Core/src/MonoDevelop.Components/MonoDevelop.Components.mdp    
    2007-05-31 19:59:22 UTC (rev 78372)
@@ -1,15 +1,15 @@
-<Project name="MonoDevelop.Components" fileversion="2.0" language="C#" 
clr-version="Net_1_1" ctype="DotNetProject">
+<Project name="MonoDevelop.Components" fileversion="2.0" language="C#" 
clr-version="Net_2_0" ctype="DotNetProject">
   <Configurations active="Debug">
     <Configuration name="Debug" ctype="DotNetProjectConfiguration">
       <Output directory="../../../build/AddIns/" 
assembly="MonoDevelop.Components" />
       <Build debugmode="True" target="Library" />
-      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_1_1" />
+      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_2_0" />
       <CodeGeneration compiler="Csc" warninglevel="4" optimize="False" 
unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" 
generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
     </Configuration>
     <Configuration name="Release" ctype="DotNetProjectConfiguration">
       <Output directory="../../../build/AddIns/" 
assembly="MonoDevelop.Components" />
       <Build debugmode="False" target="Library" />
-      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_1_1" />
+      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_2_0" />
       <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" 
unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" 
generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
     </Configuration>
   </Configurations>
@@ -94,24 +94,24 @@
     <File name="./gtk-gui/gui.stetic" subtype="Code" 
buildaction="EmbedAsResource" />
     <File name="./gtk-gui/objects.xml" subtype="Code" 
buildaction="EmbedAsResource" />
     <File name="./gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />
+    <File name="./MonoDevelop.Components.Commands/ICommandTargetVisitor.cs" 
subtype="Code" buildaction="Compile" />
     <File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
-    <File name="./MonoDevelop.Components.Commands/ICommandTargetVisitor.cs" 
subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
-    <ProjectReference type="Gac" localcopy="False" refto="System, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-    <ProjectReference type="Gac" localcopy="False" refto="System.Drawing, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-    <ProjectReference type="Gac" localcopy="False" refto="System.Xml, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
     <ProjectReference type="Gac" localcopy="False" refto="gecko-sharp, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=ccf7d78a55e9f021" />
     <ProjectReference type="Gac" localcopy="False" refto="glade-sharp, 
Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="False" refto="gnome-sharp, 
Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Project" localcopy="False" 
refto="MonoDevelop.Core" />
-    <ProjectReference type="Gac" localcopy="False" refto="Mono.Posix, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
     <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="atk-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, 
Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Assembly" localcopy="False" 
refto="../../../contrib/Mono.Addins.dll" />
     <ProjectReference type="Assembly" localcopy="False" 
refto="../../../contrib/Mono.Addins.Setup.dll" />
+    <ProjectReference type="Gac" localcopy="True" refto="System, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+    <ProjectReference type="Gac" localcopy="True" refto="System.Drawing, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+    <ProjectReference type="Gac" localcopy="True" refto="System.Xml, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+    <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
   </References>
   <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True" 
RelativeMakefileName="./Makefile.am" BuildTargetName="" CleanTargetName="" 
SyncReferences="True" IsAutotoolsProject="True" 
RelativeConfigureInPath="../../../">
     <ExcludedFiles>

Modified: trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog       2007-05-31 
19:54:14 UTC (rev 78371)
+++ trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog       2007-05-31 
19:59:22 UTC (rev 78372)
@@ -1,3 +1,9 @@
+2007-06-01  Ankit Jain  <[EMAIL PROTECTED]>
+
+       * MonoDevelop.Core/SystemAssemblyService.cs (assemblyFullNameToPath):
+       Change type from Hashtable to Dictionary<string,string>.
+       (GetAssemblyFullNames): New.
+
 2007-05-28  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Core.ProgressMonitoring/FilteredProgressMonitor.cs,

Modified: 
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/SystemAssemblyService.cs
===================================================================
--- 
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/SystemAssemblyService.cs
       2007-05-31 19:54:14 UTC (rev 78371)
+++ 
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/SystemAssemblyService.cs
       2007-05-31 19:59:22 UTC (rev 78372)
@@ -2,6 +2,7 @@
 using System.Threading;
 using System.IO;
 using System.Collections;
+using System.Collections.Generic;
 using System.Diagnostics;
 using System.Reflection;
 using MonoDevelop.Core.Execution;
@@ -13,7 +14,7 @@
        public class SystemAssemblyService : AbstractService
        {
                Hashtable assemblyPathToPackage = new Hashtable ();
-               Hashtable assemblyFullNameToPath = new Hashtable ();
+               Dictionary<string, string> assemblyFullNameToPath = new 
Dictionary<string, string> ();
                Hashtable packagesHash = new Hashtable ();
                ArrayList packages = new ArrayList ();
                
@@ -34,6 +35,11 @@
                {
                        return new ClrVersion [] { ClrVersion.Net_1_1, 
ClrVersion.Net_2_0 };
                }
+
+               public ICollection<string> GetAssemblyFullNames ()
+               {
+                       return assemblyFullNameToPath.Keys;
+               }
                
                public SystemPackage RegisterPackage (string name, string 
version, string description, ClrVersion targetVersion, params string[] 
assemblyFiles)
                {
@@ -68,8 +74,8 @@
                        Initialize ();
                        
                        fullname = NormalizeAsmName (fullname);
-                       string path = (string)assemblyFullNameToPath[fullname];
-                       if (path == null)
+                       string path;
+                       if (!assemblyFullNameToPath.TryGetValue (fullname, out 
path))
                                return null;
 
                        return (SystemPackage) assemblyPathToPackage[path];
@@ -100,7 +106,7 @@
                {
                        Initialize ();
                        fullname = NormalizeAsmName (fullname);
-                       if (assemblyFullNameToPath.Contains (fullname))
+                       if (assemblyFullNameToPath.ContainsKey (fullname))
                                return fullname;
                        
                        // Try to find a newer version of the same assembly.
@@ -120,8 +126,8 @@
                        
                        assemblyName = NormalizeAsmName (assemblyName); 
                        
-                       string path = (string)assemblyFullNameToPath 
[assemblyName];
-                       if (path != null)
+                       string path;
+                       if (assemblyFullNameToPath.TryGetValue (assemblyName, 
out path))
                                return path;
 
                        if (assemblyName == "mscorlib")
@@ -199,10 +205,10 @@
                                return fullName;
                        
                        string fname = Path.GetFileName ((string) 
assemblyFullNameToPath [fullName]);
-                       foreach (DictionaryEntry e in assemblyFullNameToPath) {
-                               SystemPackage rpack = (SystemPackage) 
assemblyPathToPackage [e.Value];
-                               if (rpack.IsCorePackage && rpack.TargetVersion 
== targetVersion && Path.GetFileName ((string)e.Value) == fname)
-                                       return (string) e.Key;
+                       foreach (KeyValuePair<string, string> pair in 
assemblyFullNameToPath) {
+                               SystemPackage rpack = (SystemPackage) 
assemblyPathToPackage [pair.Value];
+                               if (rpack.IsCorePackage && rpack.TargetVersion 
== targetVersion && Path.GetFileName (pair.Value) == fname)
+                                       return pair.Key;
                        }
                        return null;
                }
@@ -214,7 +220,7 @@
                        assemblyName = NormalizeAsmName (assemblyName);
                        
                        // Fast path for known assemblies.
-                       if (assemblyFullNameToPath.Contains (assemblyName))
+                       if (assemblyFullNameToPath.ContainsKey (assemblyName))
                                return assemblyName;
 
                        AssemblyLocator locator = (AssemblyLocator) 
Runtime.ProcessService.CreateExternalProcessObject (typeof(AssemblyLocator), 
true);

Modified: trunk/monodevelop/Core/src/MonoDevelop.Documentation/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Documentation/ChangeLog      
2007-05-31 19:54:14 UTC (rev 78371)
+++ trunk/monodevelop/Core/src/MonoDevelop.Documentation/ChangeLog      
2007-05-31 19:59:22 UTC (rev 78372)
@@ -1,3 +1,7 @@
+2007-06-01  Ankit Jain  <[EMAIL PROTECTED]>
+
+       * MonoDevelop.Documentation.mdp: Change runtime to 2.0 .
+
 2007-05-30  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Documentation/DocumentationService.cs: Don't crash is

Modified: 
trunk/monodevelop/Core/src/MonoDevelop.Documentation/MonoDevelop.Documentation.mdp
===================================================================
--- 
trunk/monodevelop/Core/src/MonoDevelop.Documentation/MonoDevelop.Documentation.mdp
  2007-05-31 19:54:14 UTC (rev 78371)
+++ 
trunk/monodevelop/Core/src/MonoDevelop.Documentation/MonoDevelop.Documentation.mdp
  2007-05-31 19:59:22 UTC (rev 78372)
@@ -1,15 +1,15 @@
-<Project name="MonoDevelop.Documentation" fileversion="2.0" language="C#" 
clr-version="Net_1_1" ctype="DotNetProject">
+<Project name="MonoDevelop.Documentation" fileversion="2.0" language="C#" 
clr-version="Net_2_0" ctype="DotNetProject">
   <Configurations active="Debug">
     <Configuration name="Debug" ctype="DotNetProjectConfiguration">
       <Output directory="../../../build/AddIns/" 
assembly="MonoDevelop.Documentation" />
       <Build debugmode="True" target="Library" />
-      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_1_1" />
+      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_2_0" />
       <CodeGeneration compiler="Csc" warninglevel="4" optimize="False" 
unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" 
generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
     </Configuration>
     <Configuration name="Release" ctype="DotNetProjectConfiguration">
       <Output directory="../../../build/AddIns/" 
assembly="MonoDevelop.Documentation" />
       <Build debugmode="False" target="Library" />
-      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_1_1" />
+      <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_2_0" />
       <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" 
unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" 
generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
     </Configuration>
   </Configurations>
@@ -19,10 +19,10 @@
     <File name="./MonoDevelop.Documentation.addin.xml" subtype="Code" 
buildaction="FileCopy" />
   </Contents>
   <References>
-    <ProjectReference type="Gac" localcopy="False" refto="System.Xml, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
     <ProjectReference type="Project" localcopy="False" 
refto="MonoDevelop.Core" />
     <ProjectReference type="Project" localcopy="False" 
refto="MonoDevelop.Projects" />
     <ProjectReference type="Gac" localcopy="False" refto="monodoc, 
Version=1.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
+    <ProjectReference type="Gac" localcopy="True" refto="System.Xml, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
   </References>
   <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True" 
RelativeMakefileName="./Makefile.am" BuildTargetName="" CleanTargetName="" 
SyncReferences="True" IsAutotoolsProject="True" 
RelativeConfigureInPath="../../../">
     <ExcludedFiles>

Modified: trunk/monodevelop/Extras/prj2make-sharp-lib/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/prj2make-sharp-lib/ChangeLog       2007-05-31 
19:54:14 UTC (rev 78371)
+++ trunk/monodevelop/Extras/prj2make-sharp-lib/ChangeLog       2007-05-31 
19:59:22 UTC (rev 78372)
@@ -1,3 +1,9 @@
+2007-06-01  Ankit Jain  <[EMAIL PROTECTED]>
+
+       * MSBuildFileFormat.cs (ReadItemGroups): If reference name cannot be
+       resolved, then try to find the correct case for the assembly name.
+       (AssemblyNamesTable): New.
+
 2007-05-31  Ankit Jain  <[EMAIL PROTECTED]>
 
        * MSBuildFileFormat.cs: Don't remove './' from the paths. VS2005 is not

Modified: trunk/monodevelop/Extras/prj2make-sharp-lib/MSBuildFileFormat.cs
===================================================================
--- trunk/monodevelop/Extras/prj2make-sharp-lib/MSBuildFileFormat.cs    
2007-05-31 19:54:14 UTC (rev 78371)
+++ trunk/monodevelop/Extras/prj2make-sharp-lib/MSBuildFileFormat.cs    
2007-05-31 19:59:22 UTC (rev 78372)
@@ -844,6 +844,24 @@
                                        case "Reference":
                                                string hintPath = String.Empty;
                                                string fullname = 
Runtime.SystemAssemblyService.GetAssemblyFullName (include);
+                                               if (fullname == null) {
+                                                       // Check if the case of 
the assembly name might be incorrect
+                                                       // Eg. System.XML
+                                                       int commaPos = 
include.IndexOf (',');
+                                                       string asmname = 
include;
+                                                       string rest = 
String.Empty;
+
+                                                       if (commaPos >= 0) {
+                                                               asmname = 
include.Substring (0, commaPos).Trim ();
+                                                               rest = 
include.Substring (commaPos);
+                                                       }
+
+                                                       if 
(AssemblyNamesTable.ContainsKey (asmname) && asmname != AssemblyNamesTable 
[asmname]) {
+                                                               // assembly 
name is in the table and case is different
+                                                               fullname = 
Runtime.SystemAssemblyService.GetAssemblyFullName (
+                                                                       
AssemblyNamesTable [asmname] + rest);
+                                                       }
+                                               }
                                                if ((fullname != null && 
                                                        
Runtime.SystemAssemblyService.FindInstalledAssembly (fullname) != null) ||
                                                        !ReadAsString (node, 
"HintPath", ref hintPath, false)) {
@@ -1354,6 +1372,27 @@
                                return conditionRegex;
                        }
                }
+
+               // Contains only assembly name like "System.Xml"
+               // used to get the correct case of assembly names,
+               // like System.XML
+               static Dictionary<string, string> assemblyNamesTable = null;
+               static Dictionary<string, string> AssemblyNamesTable {
+                       get {
+                               if (assemblyNamesTable == null) {
+                                       assemblyNamesTable = new 
Dictionary<string, string> (StringComparer.InvariantCultureIgnoreCase);
+                                       foreach (string fullname in 
Runtime.SystemAssemblyService.GetAssemblyFullNames ()) {
+                                               string name = fullname;
+                                               if (name.IndexOf (',') >= 0)
+                                                       name = name.Substring 
(0, name.IndexOf (',')).Trim ();
+                                               assemblyNamesTable [name] = 
name;
+                                       }
+                               }
+
+                               return assemblyNamesTable;
+                       }
+
+               }
        }
 
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to