This is a migrated thread and some comments may be shown as answers.

VS 15 and enhancer

2 Answers 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Maarten
Top achievements
Rank 2
Maarten asked on 10 Oct 2016, 07:29 PM

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 Answers, 1 is accepted

Sort by
0
Maarten
Top achievements
Rank 2
answered on 11 Oct 2016, 09:12 PM

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

0
Maarten
Top achievements
Rank 2
answered on 18 Oct 2016, 12:03 PM

Hi,

Nice to see such a quick response :-(

Maarten

Tags
General Discussions
Asked by
Maarten
Top achievements
Rank 2
Answers by
Maarten
Top achievements
Rank 2
Share this question
or