[Mono-dev] VS2003 Convertion fail, because "null"

Petit Eric surfzoid at gmail.com
Tue Nov 11 16:49:35 EST 2008


When trying to open a VS2003 solution and choice to convert to VS2005,
there is a first error who stop the convertion, i put here a possible
patch, but after there is another break, but we see the converted prj
:
the patch :
bash-3.2# svn diff
/home/eric/tmp/monoSVN/monodevelop/main/src/core/MonoDevelop.Projects/MonoDevelop.Projects/DotNetProject.cs
Index: /home/eric/tmp/monoSVN/monodevelop/main/src/core/MonoDevelop.Projects/MonoDevelop.Projects/DotNetProject.cs
===================================================================
--- /home/eric/tmp/monoSVN/monodevelop/main/src/core/MonoDevelop.Projects/MonoDevelop.Projects/DotNetProject.cs
(révision 118548)
+++ /home/eric/tmp/monoSVN/monodevelop/main/src/core/MonoDevelop.Projects/MonoDevelop.Projects/DotNetProject.cs
(copie de travail)
@@ -239,16 +239,23 @@
                                CompileTarget = CompileTarget.Library;
                        }

+                       try {
                        foreach (DotNetProjectConfiguration parameter
in Configurations) {
-                               parameter.OutputDirectory =
Path.Combine (binPath, parameter.Id);
-                               parameter.OutputAssembly  = info.ProjectName;
+                               if (parameter != null)
+                               {
+                                       parameter.OutputDirectory =
Path.Combine (binPath, parameter.Id);
+                                       parameter.OutputAssembly  =
info.ProjectName;

-                               if (projectOptions != null) {
-                                       if
(projectOptions.Attributes["PauseConsoleOutput"] != null) {
-
parameter.PauseConsoleOutput =
Boolean.Parse(projectOptions.Attributes["PauseConsoleOutput"].InnerText);
+                                       if (projectOptions != null) {
+                                               if
(projectOptions.Attributes["PauseConsoleOutput"] != null) {
+
parameter.PauseConsoleOutput =
Boolean.Parse(projectOptions.Attributes["PauseConsoleOutput"].InnerText);
+                                               }
                                        }
                                }
                        }
+                       } catch (Exception Ex) {
+                               Console.WriteLine(Ex.Message +
Environment.NewLine + Ex.StackTrace);
+                       }

                        this.usePartialTypes = SupportsPartialTypes;
                }
bash-3.2#

The VS2003 solution i used for test :
http://www.codeproject.com/KB/cs/XmlParser.aspx file :
http://www.codeproject.com/KB/cs/XmlParser/XmlParser.zip

-- 

Cordially.

Small Eric Quotations of the days:
---------------------------------------------------------------------------
If one day one reproaches you that your work is not a work of
professional, say you that:
Amateurs built the arch of Noah, and professionals the Titanic.
---------------------------------------------------------------------------

Few people are done for independence, it is the privilege of the powerful ones.
---------------------------------------------------------------------------

No key was wounded during the drafting of this message.


More information about the Mono-devel-list mailing list