Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Entity Framework metadata problem using console tool
dpc640
#1 Posted : Wednesday, May 6, 2015 5:10:42 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/15/2014(UTC)
Posts: 8
Location: United States of America

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Hello,

I have a solution with over thirty projects, including a DBModel project and a project that only runs tests which require an actual database connection. When run from my development machine, the console tool works perfectly.

When running from an NCrunch grid server, I get:

Code:
 System.Data.Entity.Core.MetadataException : Unable to load the specified metadata resource


The metadata is included in resources in the DBModel.dll, and we have no problems when running from other non-development systems. Including running from the same server as a grid node.

Any ideas?

Thanks,

Patrick
Remco
#2 Posted : Wednesday, May 6, 2015 9:44:40 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Patrick,

Is it possible that the DBModel.dll is included in the GAC on the client machine, or somehow being referenced in a global manner? (i.e. by absolute path) If so, this would cause problems for finding the file on the grid node.

Would you be able to inspect the workspace created on the grid node to see how the code is being arranged and how this DLL is being referenced? You can do this by through the following steps:

1. Set up a network share pointing to the workspace base path on the grid node server (read-only is fine)
2. In the grid node configuration tool, set the 'Workspace base path over network share' to consider the network share name
3. Turn off local processing in the distributed processing window
4. Turn on processing for the grid server only
5. Re-run the test and wait until it fails
6. Right-click the failed test, choose Advanced->Browse to workspace

This will allow you to inspect the contents of the workspace built on the grid node server. Of particular interest is the manner in which the test project is referencing the DBModel project inside its project file. How is this being done? Is this correctly pointing to another workspace with the DLL file sitting in its build output directory?
dpc640
#3 Posted : Thursday, May 7, 2015 8:26:20 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/15/2014(UTC)
Posts: 8
Location: United States of America

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Ok, great call, that pointed out a problem. If I look at the dll built from studio, the entity framework artifacts are included as resources. Looking at the dll in the NCrunch workspace, they are not included. Any ideas why that might be?

Thanks,

Patrick

Remco
#4 Posted : Thursday, May 7, 2015 9:51:31 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi Patrick,

That is of great interest. Does NCrunch give you any warnings about missing SDKs or build targets on the grid node? My first guess here would be that this behaviour requires an SDK to be installed on the machine, which may not exist on the grid node.
dpc640
#5 Posted : Wednesday, May 13, 2015 5:46:33 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/15/2014(UTC)
Posts: 8
Location: United States of America

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Remco,

I didn't see any SDK warnings, but I reinstalled and updated Visual Studio on my build machine, and that took care of the problem.

Thanks for your help!

Patrick
1 user thanked dpc640 for this useful post.
Remco on 5/13/2015(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.039 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download