Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scaffolding Controllers or Views using EntityFramework is not supported when using configSource in the Web.config

If I try to add a new Web API 2 Controller with actions, using Entity Framework I get the following message:

Scaffolding Controllers or Views using EntityFramework is not supported when using configSource in the Web.config

enter image description here

The only configSource I have in Web.config is for Unity.

<unity configSource="Unity.config" />

If I comment out this line I can use the method as intended. Is this related to Unity, DI or just configSource?

like image 892
Ogglas Avatar asked Dec 19 '25 04:12

Ogglas


1 Answers

In VS2015 this gave a hard error and you had no idea where to look.

They 'fixed' the issue in VS2017 by adding this error message. There is no solution, other than to put your config data (in my case connectionstrings) directly into web.config, and not refer to an external file.

No other solution is available

like image 151
Daniël Camps Avatar answered Dec 21 '25 18:12

Daniël Camps



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!