hubFS: THE place for F#

. . . are you on The Hub?
Welcome to hubFS: THE place for F# Sign in | Join | Help
in Search

Bug: XML Serialization in FSI throws exception

Last post 01-06-2008, 1:11 by Stephan. 6 replies.
Sort Posts: Previous Next
  •  01-03-2008, 16:22 4464

    Bug: XML Serialization in FSI throws exception

    Hey everyone,

    Has anyone else noticed that you can do XML Serialization from FSI (in Visual Studio) on the second time, but not the first?

    Here's what I'm doing:

    1) Using F# to create a MyCustomObject (which is written in C# and marked as Serializable)

    2) Calling myCustomObject.Serialize("file.xml"), which in turn serializes the object's data to file.xml

    3) Upon doing this, FSI throws an exception:


    stdin(0,0): error: Unable to find the file MyNamespace.MyCustomObject.XmlSerializers.dll in any of
     C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\
     C:\WINDOWS\system32\..\assembly\GAC\Microsoft.Office.Interop.Owc11\11.0.0.0__71e9bce111e9429c
     <other paths here>
    C:\Program Files\FSharp-1.9.3.7\bin.

     It was looking for a non-existent DLL (MyNamespace.MyCustomObject.XmlSerializers.dll) and failed.

    4) So out of curiosity, I just ran my script again (Ctrl-A, Alt-Enter) and it worked as expected.  I think that to do XML Serialization, the .NET Framework needs to create a temporary class at runtime that know how to serialize my custom object.  For some reason, FSI can't find the assembly the first time, but can the second time. 

    Most odd :)  Hope that helps someone.

    -Matt


    http://thevalerios.net/matt/
  •  01-04-2008, 15:52 4468 in reply to 4464

    Re: Bug: XML Serialization in FSI throws exception

    Yes, I've seen this problem, as has Mark Staples who reported it to me a while back. We haven't yet addressed it....

    Kind regards

    Don

  •  01-04-2008, 16:04 4469 in reply to 4468

    Re: Bug: XML Serialization in FSI throws exception

    Ah, that's ok :)  Not a showstopper by any means.  For F# being beta, it's amazingly functional (pun most definately intended) and it works great (95% of the time).  Can't wait for the real productized version, though, I have to admit. :)

    Is there any chance that an external-facing bugtracker for F# will be set up?  I remember something being mentioned awhile back. :)

     

     


    http://thevalerios.net/matt/
  •  01-04-2008, 17:43 4471 in reply to 4469

    Re: Bug: XML Serialization in FSI throws exception

    Thanks!

    We've been discussing when to set up a connect.microsoft.com program for F#. This is the usual way external-facing issue tracking is done through Microsoft, though I believe the full issue database is not available: only the particular issues reported through this program. If you or others have used connect.microsoft.com before I'd be interested in your experiences.

    Kind regards

    Don

  •  01-04-2008, 18:01 4472 in reply to 4471

    Re: Bug: XML Serialization in FSI throws exception

    Hi Don,

    I've used Microsoft Connect a few times in the past.  I've mostly ended up there as a result of googling for error messages for various things.  Seems to work fine for me, and if that's the usual Microsoft way of doing things, then I say go for it:)  I think it would be helpful for you (the developers) to see the severity and prioritize what bugs/improvements the F# community wants to see happen, since Microsoft Connect lets you vote on things.  I think it would be valuable.

    +1 vote for Microsoft Connect

    -Matt

     


    http://thevalerios.net/matt/
  •  01-06-2008, 0:50 4486 in reply to 4472

    Re: Bug: XML Serialization in FSI throws exception

    Hi Don,

    I've used Connect a bit, mainly to report SSIS bugs \ quirks. I think it's a good way of getting community feedback - as long as you don't close all tickets with "by design" as the "reason" :) 

    Dave

  •  01-06-2008, 1:11 4488 in reply to 4471

    Re: Bug: XML Serialization in FSI throws exception

    Last time I checked Connect had problems with Firefox browsers. The mandatory localization is also pretty irritating, at least I haven't figured out how to switch the language from German to English. There's also the requirement for a Microsoft Live account, which might be controversial among Mono or OCaml developers.

    Anyway, a public issue tracker based on Connect would be better than no tracker.

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems