At work I just installed a brand new copy of my OS and a brand new copy of VS2015. When I clone my solution for the first time, I cannot build it anymore, even if I've generated the C# files like I always do, by opening the .edmx file first, and clicking on "save" icon.
When building it throws the error:
CS0150: A constant value is expected
Because the enums that it has generated are incomplete! An example of one:
public enum DocumentType : int
{
Identity = 1,
ResidenceProof = 2,
RegisterDoc = ,
}
I also had this compiler error at the time, but after fixing it my C# enums are still being generated wrongly:
The ADO.NET provider with invariant name 'MySql.Data.MySqlClient' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details
How the hell should I fix this problem?
I had the same problem. Turned out that texttransform.exe cannot understand different line endings well. My .tt file was saved with Unix EOL, and when I saved it with Windows EOL, it started to work correctly. Just that simple - open your .tt file in WordPad and save.