Richie Scott

When debugging my application I get the following runtime error:

Could not load file or assembly 'System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

The version of System I have is

I'm assuming I've messed up an install or not downloaded something and I'm hoping others have had the same problems and succssfully got it working.

I'm on Vista Business with Visual Studio 2008 Beta 2. My code is as follows (don't laugh) and breaks on the foreach.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Data.Objects.DataClasses;

using Microsoft.Astoria.Client;

using DataWebService;

using OrderModel;

namespace AstoriaClientConsoleApplication


class Program


static void Main(string[] args)


WebDataContext ctx = new WebDataContext("http://localhost:49177/OrderWebService.svc");

WebDataQuery<SOPOrderReturn> Orders = ctx.CreateQuery<SOPOrderReturn>("/SOPOrderReturn");

foreach (SOPOrderReturn o in Orders)







Re: ADO.NET Data Services (Pre-Release) Astoria Client Library Problems - System version mismatch

Julie Lerman

Well, that's wierd! (And I'm not talking about your code. ) The reason you get the error on the foreach is that that's when the query is actually executed, all of the prior code is just "setting up".

I am not familiar with this error and the only thing I can suggest (while waiting for the only two real pros on the planet right now) is to check the Target Framework for the project. You'll want .NET Framework 3.5. Just in case you don't know how to check that, it's in the project properties, Application tab.

I imagine that you have tested the service already (e.g. making calls to the service in a browser) so you know that's running which should prove that you have the right version of Astoria and of Entity Framework.

Re: ADO.NET Data Services (Pre-Release) Astoria Client Library Problems - System version mismatch

Pablo Castro - MSFT

A couple of things that might help:

-To debug a silverlight application you need to have the Silverlight 1.1 alpha tools installed and you need to attach to the process using the silverlight debugger, not the regular clr debugger. I think it's called core clr or something along those lines.

-Most of the .net 2.0 assemblies have version Silverlight 1.1 alpha assemblies have versions like They don't mix (they won't even load in each other's environment). So you should make sure you're referencing the right assemblies (this typically happens by default in silverlight applications if you're using the silverlight VS templates).

Pablo Castro

Technical Lead

Microsoft Corporation