Entity Framework: Cannot register assembly provider in Web.Config

I get this error whenever I try to update or save my entity data model:

ERROR: Unable to register the build provider in Web.Config because of the following exception: 'Object reference not set to an instance of an object.'.

      

Then when I try to run the application I get:

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.

      

How do I fix this so that it can write to the Web.config. I went through it with a fine comb, but I came up with nothing that is broken in XML.

+2


source to share


4 answers


You must change the following line

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

      

to



<configuration>

      

in the web.config file.

+1


source


Not sure what caused this, it is possible that the entity framework files were corrupted in some way.



The easiest way to fix this is to remove the model, remove any link from the web.config, and re-create the model using the wizard.

0


source


What I ended up doing is rolling back my code. SVN. I didn't take the time to figure out what was completely wrong. If this happens again, I will post more information.

0


source


It really works.

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> 

      

to

<configuration> 

      

The reason for the refusal was: due to this parameter, the assembly developer was unable to register the connection string in the web.config.

-1


source







All Articles