You can always simply turn off casting to a smaller type in the project settings.
If this does not work, since the check is compiled in the dll, you can try to set the link to the dll without debugging, because the check can only be enabled for the debugging "optimized" assembly. This may affect your debugging, though, of course.
source
share