Page 1 of 1

Code generated using the T4 templates may not work correctly

Posted: Sat 01 Feb 2014 18:56
by hispafox
I want to deploy to a windows azure web
I receive this error:
"Code generated using the T4 templates for Database First and Model First development may not work correctly if used in Code First mode. To continue using Database First or Model First ensure that the Entity Framework connection string is specified in the config file of executing application. To use these classes, that were generated from Database First or Model First, with Code First add any additional configuration using attributes or the DbModelBuilder API and then remove the code that throws this exception. "
I had copied the connection string to the web.config

Whats the problem ?

Re: Code generated using the T4 templates may not work correctly

Posted: Mon 03 Feb 2014 14:18
by Shalex
This error occurs if the format of your connection string is the one with *.ssdl, *.csdl, *.msl specified.
You are working with Entity Developer (*.edml, the Devart Entity Model item), aren't you? If yes, open the model, select diagram surface and navigate to its properties, set Metadata Artifact Processing to Do Not Generate Mapping Files. This will update the connection string to the proper (Code-First) format.