You can do whatever suits you best; you can hand in your application for an entry visa and your application for family immigration at the same time, or you can hand in your entry visa application after you have submitted your application for family immigration.
It is also possible to hand in an application for an entry visa before your family immigration application, but in such case you will have to hand in all documentation required for family immigration together with your application for an entry visa.
Read on for more information about entry visas (D-visas) and whether you can apply.