Reputation: 55
When Running a console app packaged to a single .exe with costura.fody I appear to be unable to access my app.config resulting in the error
System.InvalidOperationException: No connection string named 'volumeEntities' could be found in the application config file. at System.Data.Entity.Internal.LazyInternalConnection.get_ConnectionHasModel()
When I test in my nunit test project the app.config I added there which contains the connection string works.
I have an app.config added to the only other project in the solution. It contains the correct connection string In properties the Startup Object is set to 'Uploader.Program'
Am I missing some way of setting the project as the start up rather than the program class? How can I get the executable to find the app.config?
Upvotes: 0
Views: 1333
Reputation: 55
Fody costura does not package the app.config file with the executable so that you can change information in the app.config without recompiling. Copy the .exe.config to the same folder as the executable.
Upvotes: 2