Entity framework and Teamcity


1-Read completely


Thank you.


I can't seem to configure correctly teamcity for entity framework. Each time i try to build something with entity framework it tells me that it does not find any connection with the name 'NameOFConnectionHere' in the appconfig. But my project build and execute perfectly, the appconfig contain the connection string (the appconfig is part of my startup project and there is no fault in the name). If i run it in debug mode. I suspect TeamCity to jam somewhere along the way not finding the application.config in the project... but i just can't put my finger on it. I have try the following solutions.

Solutions tried

Updated TeamCity to the latest version using 9.1.6 right now build 37459

Try to put the connection string inside the dbcontext constructor

Deleted the edmx file and redo from scratch

try to move the connection string to machine.config.

Thank you

1 comment
Comment actions Permalink


Have you tried to run the same build via command line on agent machine under the same user as the agent is running? Does the build run successfully? Please follow the recommendations from this article to investigate the issue.


Please sign in to leave a comment.