Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MM Jump Start EF BLG can't find app.config file
Message
 
À
08/08/2011 16:58:30
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
OS:
Windows 7
Divers
Thread ID:
01520404
Message ID:
01520455
Vues:
45
>>>>>>I get a message window "A config file was not found in the project directory." no title or other information
>>>>>>OK returns to the BLG with [Cancel] the only option.
>>>>>
>>>>>>Al Allison
>>>>>
>>>>>After installing the new 4.0 release, I got this same error when I read the bizobj wizard. I looked in the ABusinessObject.cs class in the root of the business objects directory, and found that for this value:
>>>>>
>>>>>this.DatabaseKey =
>>>>>
>>>>>The name of the database from the app.config file had NOT been inserted. I added it. Now the error does not appear when going through the wizard.
>>>>>
>>>>>Ron Edge
>>>>>P.S. I see I need to change my credentials, I retired from IU Mar 1, but I am working on a consulting project with MM.NET 4.0 right now.
>>>>
>>>>Ron,
>>>>
>>>>Thank you for the reply. In ABusinessObject.cs I show
>>>>
>>>> this.DatabaseKey = "EntityDataModelContainer";
>>>>
>>>>Do you think it should be
>>>>
>>>> "Northwind\Connection"
>>>>
>>>>the key from the app.config in databases?
>>>>
>>>>Thanks,
>>>
>>>Yes, it needs to be the database key that is defined in your app.config file and also in your web.config file.
>>>Timothy
>>
>>Timothy,
>>Thank you for the reply.
>>I am on the first part of Order System Business Objects EF CSharp.csproj
>>An Entity Framework Business Object Library
>>There was no web.config file generated in the project folder
>>What did I miss?
>>Thanks,
>>Al Allison
>
>A Web config file would be required for the project for a web application. The business object project only needs the app.config. The business object project uses the connection in the app.config for connection during development primarily for the business object generator. When the application is added the application uses the app.config connections for a windows project and a web.config for a web project to connect to the database.
>Timothy

Yes, that was my understanding from the Jump Start, and the app.config is present. I think the message is misleading. I have worked around that a bit between the app.config and the ABusinessObject.DatabaseKey I get a good build now.

I must have a connection string problem somewhere. It fails to connect with NUnit.

Thanks for your assistance.

Al Allison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform