locked
Silverlight and Astoria RRS feed

  • Question

  • Julie Lerman askedme to pst this question as she is having problems getting connected to the forums.

     

    Im building a simple silverlight app for working with an Astoria service.

    Instantiating WebDataQuery is throwing a FileNotFoundException for System.Data.Entity.dll (or one of it’s dependencies). It doesn't even do this at the line of code, but refuses to run any module that contains this code. Silverlight just ignores the whole code module and goes on it's merry way.

    EF is on my system and heavily used and that API is definitely referenced in the silverlight app.

    The app is okay with instantiating a webdatacontext, but not a webdataquery.

    I have stripped everything else out. I'm not even executing a query.

    If I have nothing more than

    Dim _ctx As Microsoft.Astoria.Client.WebDataContext

    Dim q As Microsoft.Astoria.Client.WebDataQuery(Of AstoriaTest.AdventureWorksLTModel.ProductCategory)

    it fails and the entire code module that those lines are in is ignored.

    If I only have the first line, the code module is hit.

    I have tried this on two separate computers.

    Thanks for any help.

    Friday, October 5, 2007 9:09 PM

Answers

  • [Let's see if I can post anything yet!]

     

    While I absolutely had the correct dll (Microsoft.Astoria.Silverlight), the cause of this problem was becasue I had the astoria project in the same solution as my silverlight project and was referencing the astoria project for a quick way to get the classes into the silverlight project. Unfortunately, this caused the Microsoft.Astoria.dll to get referenced in the silverlight project and that was causing that particular problem.

     

    But since I was working in VB, I couldnt just add the class built by ClientEDMGen into my project. My work around for that was to create a class project for that class. i had to reference that project's compiled DLL directly, though, since Silverlight doesn't seem to let you reference projects.

     

    I have run into other roadblocks that were mostly due to the fact that I was trying to build the Silveright app in VB. I got past most of them but finally got so stuck on one issue and when I tried to do it in C# it just worked, so I will stay away from VB with the prototype. That's not a complaint, it's just a prototype. I can code in C# (just not very quickly ).

    Saturday, October 6, 2007 11:37 PM

All replies

  • [Let's see if I can post anything yet!]

     

    While I absolutely had the correct dll (Microsoft.Astoria.Silverlight), the cause of this problem was becasue I had the astoria project in the same solution as my silverlight project and was referencing the astoria project for a quick way to get the classes into the silverlight project. Unfortunately, this caused the Microsoft.Astoria.dll to get referenced in the silverlight project and that was causing that particular problem.

     

    But since I was working in VB, I couldnt just add the class built by ClientEDMGen into my project. My work around for that was to create a class project for that class. i had to reference that project's compiled DLL directly, though, since Silverlight doesn't seem to let you reference projects.

     

    I have run into other roadblocks that were mostly due to the fact that I was trying to build the Silveright app in VB. I got past most of them but finally got so stuck on one issue and when I tried to do it in C# it just worked, so I will stay away from VB with the prototype. That's not a complaint, it's just a prototype. I can code in C# (just not very quickly ).

    Saturday, October 6, 2007 11:37 PM