VS 15 and enhancer

3 posts, 0 answers
  1. Maarten
    Maarten avatar
    13 posts
    Member since:
    Feb 2013

    Posted 10 Oct Link to this post

    Hi,

    I know VS 15 is not officially supported yet, but it has an issue with the enhancer. I'm trying preview 5 now and I'm unable to build my solution. I'm getting "OpenAccess Enhancer error 0: Expression of type x cannot be used for return type 'System.Enum" where x is an enum type; x is also the very first enum type property in the very first MappingConfiguration that the enhancer encounters. The solution builds without any issues in VS 2015 and I'm using Data Access 2016.2.822.1

    thanks, Maarten

  2. Maarten
    Maarten avatar
    13 posts
    Member since:
    Feb 2013

    Posted 11 Oct Link to this post

    Hi again,

    Thanks to a very helpful person at Microsoft, I managed to work around the issue. If I explicitly cast the enum type properties to Enum, like so: configuration.HasProperty(x => (Enum)x.Category)... , the problem disappears and the solution builds fine.

    Maarten

  3. DevCraft banner
  4. Maarten
    Maarten avatar
    13 posts
    Member since:
    Feb 2013

    Posted 18 Oct Link to this post

    Hi,

    Nice to see such a quick response :-(

    Maarten

Back to Top