Prev: Speed up ProgressBar - how ?
Next: about compression
From: Simon H on 28 Feb 2010 02:40 Hi all, Apologies if there is a better group for this but I couldn't find it. I have been playing a bit with the Entity Framework using Visual Studio 2010 Beta 2 (I think). The problem I'm having is that whenever I try and use an EntityDataSource to pull data out of my entity model I am near constantly getting the following error: "The metadata specified in the connection string could not be loadedmetadata. Consider rebuilding the web project to build assemblies that may contain metadata. The following error(s) occurred: Unable to load the specified metadata resource." This is basically some sort of issue with the connection string that is sitting in my web.config file. The thing is, if I run the app - the connection string works fine. It seems to be only a problem with designers. Various combinations of closing Visual Studio and rebuilding seem to have no effect. The frustrating thing is, the connection string seems to work at least some of the time. The only other thing I can think of is the fact that unlike many of the crappy EF examples, my model is kept in a seperate class library and is being brought into the web app via a project reference. Is anyone else having a similar issue? I'm hoping its something really obvious but it keeps happening even when making new projects Many thanks S
From: Mr. Arnold on 28 Feb 2010 06:22 Simon H wrote: > Hi all, > > Apologies if there is a better group for this but I couldn't find it. > > I have been playing a bit with the Entity Framework using Visual Studio > 2010 Beta 2 (I think). You're using bata and may be there is a bug. > > The problem I'm having is that whenever I try and use an > EntityDataSource to pull data out of my entity model I am near > constantly getting the following error: > > "The metadata specified in the connection string could not be > loadedmetadata. Consider rebuilding the web project to build assemblies > that may contain metadata. The following error(s) occurred: > > Unable to load the specified metadata resource." That's the EDMX file. It's XML and may be there is a bad tag or something that's causing an error. You ever edit the EDMX file and look at it? > > This is basically some sort of issue with the connection string that is > sitting in my web.config file. Well, delete the Model out of the solution, go to the app.config, delete the connection string and rebuild the Model and copy the connection string out of the app.config to web.config. > > The thing is, if I run the app - the connection string works fine. It > seems to be only a problem with designers. Various combinations of > closing Visual Studio and rebuilding seem to have no effect. The > frustrating thing is, the connection string seems to work at least some > of the time. The connection string has nothing to do with VS and the designer, and the designer is not reliant upon the connection string when developing the solution. If the edmx is bad due to some kind of mis-edit of the file, then the designer will not show the tables in pane. The connection string is for locating the edmx and locating the database. > > The only other thing I can think of is the fact that unlike many of the > crappy EF examples, my model is kept in a seperate class library and is > being brought into the web app via a project reference. No, that's not the problem as the Model can be in a classlib like a DAL with a project reference set to it, which you should have the project reference to your classlib project by the project reference to the project that has the Model and not based on setting reference via the DLL for the classlib project. All of your projects in one Solution file and using project reference. > > Is anyone else having a similar issue? I'm hoping its something really > obvious but it keeps happening even when making new projects You're using bata, it's not the finished solution, and maybe you need to stay with VS 2008 and FW 3.5 SP1 when dealing with EF for now.
From: Andy O'Neill on 28 Feb 2010 06:57 "Simon H" <nothanks(a)hotmail.com> wrote in message news:uymQ9kEuKHA.5148(a)TK2MSFTNGP04.phx.gbl... <<>> > Is anyone else having a similar issue? I'm hoping its something really > obvious but it keeps happening even when making new projects > > Many thanks > > S Yes. I'm working using vs2010. I had weird problems with linq to sql generated by the beta. Deleting the tables out the model and recreating them fixed all of them. Seemed to me like it only stuffed everything if I had one of the files open when compiling. Not seen the issues since upgrading to rc. Plus the IDE hasn't crashed for no apparent reason, everything loads quicker, the wpf datagrid is a more recent version and.... Well you get the picture. Upgrade.
From: Family Tree Mike on 28 Feb 2010 07:30 On 2/28/2010 2:40 AM, Simon H wrote: > Hi all, > > Apologies if there is a better group for this but I couldn't find it. > > I have been playing a bit with the Entity Framework using Visual Studio > 2010 Beta 2 (I think). > > The problem I'm having is that whenever I try and use an > EntityDataSource to pull data out of my entity model I am near > constantly getting the following error: > > "The metadata specified in the connection string could not be > loadedmetadata. Consider rebuilding the web project to build assemblies > that may contain metadata. The following error(s) occurred: > > Unable to load the specified metadata resource." > > This is basically some sort of issue with the connection string that is > sitting in my web.config file. > > The thing is, if I run the app - the connection string works fine. It > seems to be only a problem with designers. Various combinations of > closing Visual Studio and rebuilding seem to have no effect. The > frustrating thing is, the connection string seems to work at least some > of the time. > > The only other thing I can think of is the fact that unlike many of the > crappy EF examples, my model is kept in a seperate class library and is > being brought into the web app via a project reference. > > Is anyone else having a similar issue? I'm hoping its something really > obvious but it keeps happening even when making new projects > > Many thanks > > S I don't know about this particular issue, but Release Candidate (RC) one, is much more stable. You can get it from here: http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx. -- Mike
|
Pages: 1 Prev: Speed up ProgressBar - how ? Next: about compression |