Changing to 64-bit configuration (other settings in project remain the same) it started to behave correctly. So this is effective solution if you don't have dependencies which cannot be converted into 64-bit project.