I found the solution to my problem...
There was a leading help in the following link:
http://blog.3d-logic.com/2012/05/28/entity-framework-code-first-and-pre-generated-views/
moozzyk says:
August 5, 2012 at 11:51 pmI did see this when using Visual Studio 2012 and EF5. For now the workaround is to edit the >template. Change the line 70 from: var errors = viewGenerator.GenerateViews(mappingItemCollection, writer).ToList(); to: var errors = viewGenerator.GenerateViews(mappingItemCollection, writer, >EntityFrameworkVersions.Version3).ToList(); Sorry for the inconvenience.
I had to slighlty modify my code in a similar way, from:
IList errors = viewGenerator.GenerateViews(mappingItems, writer);
To:
IList errors = viewGenerator.GenerateViews(mappingItems, writer, EntityFrameworkVersions.Version3);
After that, no warning nor error whatsoever.