I keep trying to install the entity framework 6 and it always rolls back with the error of
error: This operation would create an incorrectly structured docum
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.
I had the same problem. It turned out that I was adding EF to one of my really old projects and web.config had this namespace defined for <configuration />
element:
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
Removing that namespace declaration (xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"
) helped and solved this issue.
When Entity Framework is upgraded, the app.config or web.config files will get stuff written into them. I suspect that might be the problem. Take a look at your app.config or web.config files. Maybe the EF upgrade is having trouble writing to them without making an invalid xml document.
In a web app, web.config had a reference to external app.config:
<appSettings configSource="App.config" />
This requires the App.config to be in a particular format, that EntityFrameworks installer considers invalid
So, like others, the key was to:
rename/delete the App.config
Install EF
bring back the App.config
It is to do with your configuration files. Just to detail the solution I found:
First save your app.config, packages.config and web.config
Then delete them all. I actually deleted app.config and packages.config and just cleared out the lines between and in the web.config.
Then I ran the Install-Package again, all went well, then I added back in my configuration.
I had the same issue and I modified my web.config from
(<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">)
To
(<configuration>)