Could not load file or assembly ‘WebMatrix.WebData’

If you are creating an Asp.Net MVC website or an Asp.Net MVC Api Web Service, you may see yourself blocking on the execution with a missing file with WebMatrix.WebData.

Could not load file or assembly ‘WebMatrix.WebData’ or one of its dependencies. The system cannot find the file specified.

This error can be fixed by being sure that you have the WebMatrix.WebData inside your references. This assembly should be located in Asp.Net Web Page folder of Microsoft Asp.Net (c:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v2.0\Assemblies\WebMatrix.Data.dll). The best way to get the reference is simply to click Add Reference and doing a search for WebMatrix.


Once you are sure your have the WebMatrix DLL, be sure that this one have the property “Copy Local” to true.


This should solve the problem of having “Could not load file or assembly WebMatrix.WebData”.

If you like my article, think to buy my annual book, professionally edited by a proofreader. directly from me or on Amazon. I also wrote a TypeScript book called Holistic TypeScript

2 thoughts on “Could not load file or assembly ‘WebMatrix.WebData’

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.