Resolving the "Unable to load the specified metadata resource" Error When Using a Devart Entity Model

I recently made use of a Devart Entity Model to allow me to use LINQ with an Oracle database and to get around an issue when using views with Entity Framework 4.1. Everything worked well...until the code was deployed. When running on my local PC (either through Visual Studio or from another site under my local IIS) the code worked without a problem. But when built using our build machine, I would receive the "Unable to load the specified metadata resource" exception when trying to call a service method that made use of the entity model.

When I used IL DASM (ildasm.exe) to examine the manifests of the assembly built locally versus the one built on the build machine, I found that, indeed, the resources for the Devart Entity Model were not present in the assembly manifest of the assembly that was built on the build machine.

The solution -- and it's not a good solution -- was to install the Devart developer tools on the build machine. Again, this is not a good solution -- one would expect that having the required assemblies referenced by the project would be enough. But no. It's also concerning that the app would build on the build machine and not throw an exception concerning the Devart Entity Model -- it would build without a problem, but would fail to include the required information in the assembly manifest.

Comments

Popular posts from this blog

A Generic Method Using HttpClient to Make a Synchronous Get Request

The Cause and Solution for the "System.Runtime.Serialization.InvalidDataContractException: Type 'System.Threading.Tasks.Task`1[YourTypeHere]' cannot be serialized." Exception

How To Mock Out Child Components In Unit Tests of Angular 2 Code