No definition for lightmappingMode of type `UnityEngine.Light'

envirment unity5.5.0f3

in c# script, I write some code like:
UnityEngine.LightmappingMode a = obj.lightmappingMode;
obj is a UnityEngine.Light object, it seems fine in visual studio, no compile error, but it has compile error in unity editor, like this:
error CS1061: Type UnityEngine.Light' does not contain a definition for lightmappingMode’ and no extension method lightmappingMode' of type UnityEngine.Light’ could be found. Are you missing an assembly reference?

I found visual studio use Unity\Editor\Data\Managed\UnityEngine.dll, this dll has defintion for lightmappingMode,
but unity editor use Unity\Editor\Data\PlaybackEngines\windowsstandalonesupport\Managed\UnityEngine.dll,
this dll is not the same one, it doesn’t have definition for lightmappingMode.

both happend in windows and mac for unity5.5.0f3, why is that? why two dll have different definition?

Hello showtimeli,. I got the same problem in unity5.5. And can you tell me how you find unity editor use Unity\Editor\Data\PlaybackEngines\windowsstandalonesupport\Managed\UnityEngine.dll, . Where can i set this config please? And where can i see the config too. Mine VS is a little different to yours. References is in Current Project DIrectory >Library>Assembly.
Thank you very much!