• Mono开发。


    1.OpenSuse Linux 是一个不错的Linux。在使用起来,还是不错的。我感觉。

    它的一些软件并没有打到ISO里,需要添加源才能安装上,像 MYSQL Administator Tool 需要用到官方的 OSS 的源。

    OpenSuse11.2 要添加 Mono 的源才能使用调试器。 http://ftp.novell.com/pub/mono/download-stable/openSUSE_11.2/

    但是我想,总之一张盘是装不下这么东西的,如果LINUX 的ISO 控制在 4G 以内就好了。 大于4G的文件会有一些问题,比如 FAT32 文件放不下,而用NTFS硬盘安装会比较困难 ; 如果只是安装,下载也会很慢。按用途把它们分开是个不错的主意。CD 就是这么干的吧。

    2. html = Regex.Replace (html, "(\\b*__pinaspx=\".*?\"\\b*)", "", RegexOptions.IgnoreCase)  这句在 VS2008,VS2010(关键是 windows 的 .net 3.5 为了方便描述说 vs2008 ) 下没有问题, 但是在 Mono2.6 下,运行不过,也不报错, 双核CPU交替持续 100%,开始以为是死循环,但是项目在VS2008下运行良好。用 MonoDeveloper debugger 出来。难道正则的规则还会不同?

    3.vs2008 下: 静态构造函数 -> 静态方法或属性。

        Mono2.6 下: 静态构造函数 -> 静态方法。    静态属性不会执行静态构造函数 。所以在 mono2.6 的 静态构造函数中实始化静态属性的语句是无效的。

    4.Vs2008下:在 Page 的 OnPreInit 时,控件树已经建立。

      Mono2.6 下: 在Page的 OnInit 里,控件树才建立。 所以在 OnPreInit 里,不能引用控件(此时还是 null )。

    5.Mono2.6下重大的Bug。不知道是不是故意的,不知道付费产品会不会有这个问题。该Bug我调试了一周左右,从项目中把它调试出来,实在不容易。开始以为是字符集的问题,后来逐个排除,却发现是它本身的问题,所以新建了页面进行的测试。

     <asp:Button id="button1" runat="server" Text="Click me!" OnClick="button1Clicked" />
    <asp:GridView id="gvCon" runat="server" ></asp:GridView>

    代码:

    public void Page_Load(object sender,EventArgs e)
    {
    this.gvCon.DataSource = new string[]{ "helo","world"} ;
    this.gvCon.AutoGenerateColumns = true ;
    this.gvCon.Columns.Add(new ButtonField (){ CommandName = "Edit", Text="Edit" ,ButtonType = ButtonType.Button }) ;

    this.gvCon.DataBind() ;
    }

    public virtual void button1Clicked (object sender, EventArgs args)
    {

    }

    点击Button后,出现错误:

    Stack Trace:

    System.NotSupportedException: CollectionConverter cannot convert from System.String.
    at System.ComponentModel.TypeConverter.GetConvertFromException (System.Object value) [0x0001d] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System/System.ComponentModel/TypeConverter.cs:161
    at System.ComponentModel.TypeConverter.ConvertFrom (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, System.Object value) [0x00017] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System/System.ComponentModel/TypeConverter.cs:79
    at System.Web.UI.ObjectStateFormatter+TypeConverterFormatter.Read (Byte token, System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x00030] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:1020
    at System.Web.UI.ObjectStateFormatter+ObjectFormatter.ReadObject (System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:468
    at System.Web.UI.ObjectStateFormatter+TripletFormatter.Read (Byte token, System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x00006] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:716
    at System.Web.UI.ObjectStateFormatter+ObjectFormatter.ReadObject (System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:468
    at System.Web.UI.ObjectStateFormatter+ObjectArrayFormatter.Read (Byte token, System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x00016] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:807
    at System.Web.UI.ObjectStateFormatter+ObjectFormatter.ReadObject (System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:468
    at System.Web.UI.ObjectStateFormatter+ObjectArrayFormatter.Read (Byte token, System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x00016] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:807
    at System.Web.UI.ObjectStateFormatter+ObjectFormatter.ReadObject (System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:468
    at System.Web.UI.ObjectStateFormatter+TripletFormatter.Read (Byte token, System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x00006] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:716
    at System.Web.UI.ObjectStateFormatter+ObjectFormatter.ReadObject (System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:468
    at System.Web.UI.ObjectStateFormatter+ArrayListFormatter.Read (Byte token, System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x00016] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:745
    at System.Web.UI.ObjectStateFormatter+ObjectFormatter.ReadObject (System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:468
    at System.Web.UI.ObjectStateFormatter+TripletFormatter.Read (Byte token, System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x00020] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:718
    at System.Web.UI.ObjectStateFormatter+ObjectFormatter.ReadObject (System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:468
    at System.Web.UI.ObjectStateFormatter+ArrayListFormatter.Read (Byte token, System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x00016] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:745
    at System.Web.UI.ObjectStateFormatter+ObjectFormatter.ReadObject (System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:468
    at System.Web.UI.ObjectStateFormatter+TripletFormatter.Read (Byte token, System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x00020] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:718
    at System.Web.UI.ObjectStateFormatter+ObjectFormatter.ReadObject (System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:468
    at System.Web.UI.ObjectStateFormatter+PairFormatter.Read (Byte token, System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x00006] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:692
    at System.Web.UI.ObjectStateFormatter+ObjectFormatter.ReadObject (System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:468
    at System.Web.UI.ObjectStateFormatter+PairFormatter.Read (Byte token, System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x00006] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:692
    at System.Web.UI.ObjectStateFormatter+ObjectFormatter.ReadObject (System.IO.BinaryReader r, System.Web.UI.ReaderContext ctx) [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:468
    at System.Web.UI.ObjectStateFormatter.DeserializeObject (System.IO.BinaryReader r) [0x00000] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:223
    at System.Web.UI.ObjectStateFormatter.Deserialize (System.IO.Stream inputStream) [0x00011] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:142
    at System.Web.UI.ObjectStateFormatter.Deserialize (System.String inputString) [0x000a8] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/ObjectStateFormatter.cs:170
    at System.Web.UI.HiddenFieldPageStatePersister.Load () [0x00007] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/HiddenFieldPageStatePersister.cs:61
    at System.Web.UI.Page.LoadPageStateFromPersistenceMedium () [0x0000f] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/Page.cs:1908
    at System.Web.UI.Page.LoadPageViewState () [0x00000] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/Page.cs:1914
    at System.Web.UI.Page.RestorePageState () [0x00051] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/Page.cs:1558
    at System.Web.UI.Page.InternalProcessRequest () [0x001b9] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/Page.cs:1533
    at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x0005b] in /usr/src/packages/BUILD/mono-2.6/mcs/class/System.Web/System.Web.UI/Page.cs:1353

    Version information: Mono Runtime Version: tarball Mon Dec 14 22:56:02 UTC 2009; ASP.NET Version: 2.0.50727.1433

    太惨了,加载 ViewState 出错,把 GridView 的 ViewState 禁用掉就OK。 它生成的 ViewState 自己进行 Base64 解码,出错。在 VS2010下和 MonoDeveloper2.2下同样的页面,生成的 ViewState是不一样的。后来分析发现,Mono2.6下:生成 ViewState 堆栈。

    GridView.SaveViewState -> Columns.SaveViewState -> DataControlField.SaveViewState(带有ButtonField 的列)。


    从这一点来看, Mono 不仁道。

    6.MonoDeveloper 不支持 WebForm 和 WinForm 的设计模式。

    7.由于 Workflow 的 SQL 持久化 和 EntityFramework 需要 Sql2005 及以上,所以目前在 Mono中也不支持。

    时刻修改。请注意更新。。。

    alarm   作者:NewSea     出处:http://newsea.cnblogs.com/    QQ,MSN:iamnewsea@hotmail.com

      如无特别标记说明,均为NewSea原创,版权私有,翻载必纠。欢迎交流,转载,但要在页面明显位置给出原文连接。谢谢。
  • 相关阅读:
    关于-webkit-border-image的理解
    手机浏览pc网页,字体显示比样式中设置的字体更大
    网页乱码原理
    浏览器的钉点调试的作用
    zepto中的多点触摸
    parentNode和offsetParent的区别,仅仅只是定位相对不一样么
    ckeckbox的默认样式,label for添加toggle后失效,美化checkbox
    当stop()遇到animate()的回调函数
    有联系的标识变量的变化一定要同步
    当relative遇上z-index,半透明度不阻断事件捕获
  • 原文地址:https://www.cnblogs.com/newsea/p/1626780.html
Copyright © 2020-2023  润新知