According to Swiss law (Verordnung über die Einreise und die Visumerteilung, VEV, Art. 9), third state members in possession of both a valid residence permit issued by a Schengen member state or a valid type D visa and a recognized and valid travel document are exempt from visa requirements.
Please refer to the overview of ID and visa provisions according to nationality in which the visa requirements and corresponding exemptions are listed by country in alphabetical order.
For questions regarding your future residence permit in Switzerland, please contact the competent cantonal immigration authority directly.
If the above mentioned situation does not apply to you, please contact the competent Swiss representation:
Where to apply for a national visa?