Closed DesertFoxAZ closed 4 years ago
Unless you share a repro project it is going to be very hard for me to help you.
DomainMonitoringApi.DataAccess..zip See attached. When I try creating the view at Models\DomainMonitoringApiContext.cs, I get the message shown above.
I am getting the same problem. May I ask why it needs to read connection string?
It seems all it should need is .CS file were database context is defined. In my case library project for which it tries to read App.config for doesn't even have App.config (it is a DLL library). So I just created a dummy App.config with empty connection string (correct string name but not server, database, user account) and it worked but I am not sure if the output was 100 correct.
I had my co-worker try it and he was able to get it to work. However, on my machine, it works sometimes and not others. I had created the views on one database before my original post but now I can't do it anymore. The other database that didn't work from the beginning still doesn't work.
@desertfoxAZ Sound like it going to be very hard for me to repro - in addition, I cannot build your project
Closing as unable to repro
For some projects I cannot generate a view and get a dialog stating that "No connection string named 'XXXXXXX' could be found in the application config file.". The connection string does in fact exist in the app.config or web.config files and matches the name of the DbContext file.
I can get this to work for some other projects and am unable to determine what specifically about the projects where it does not work is different when comparing it to the ones that do work.