0
votes

I have a .NET 4.5 WebForms Project on Visual Studio 2012. I get an error whenever I try to install Entity Framework through Nuget or the Package Manager Console. It seems to me that it is having trouble modifying the web.config but I used a web.config validator online and everything checks out. This is a project-specific error and I can't figure out why. The Error is as follows:

Installing 'EntityFramework 6.0.1'. Successfully installed 'EntityFramework 6.0.1'. Executing script file 'C:\Users\Devan\Documents\Visual Studio 2012\Projects\AcclamareWeb\src\packages\EntityFramework.6.0.1\tools\init.ps1'. Adding 'EntityFramework 6.0.1' to [PROJECT NAME]. Successfully added 'EntityFramework 6.0.1' to [PROJECT NAME]. Executing script file 'C:\Users\Devan\Documents\Visual Studio 2012\Projects\ [PROJECT NAME]\src\packages\EntityFramework.6.0.1\tools\install.ps1'. Uninstalling 'EntityFramework 6.0.1'. Successfully uninstalled 'EntityFramework 6.0.1'. Install failed. Rolling back... This operation would create an incorrectly structured document.

Thanks!

1
See my answer here stackoverflow.com/a/21681056/164187 , maybe it will helpAntonin Jelinek

1 Answers

5
votes

I had the same problem, and discovered the cause was the element in the web.config file. In my case, I changed this:

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

to this:

<configuration>

That fixed it.