After seven years of staying in Switzerland, 4 years with students Visa, 1 year with L permit and 2 year with B permit, and a unlimited contract, I obtained my C permit in the end.
This was a huge step for me and many people asks my experience about it. Thus I thought to share it here.
Here are the criteria that's most important in the end
German Certificate:
I have many friends stayed here more than 5 years, have a good enough contract and many years of B, but they still can't get C, because of German requirements. To get a C permit, you need B1 German certificate.
Language is best learned intensively and immersivley. I lived in Berlin for 2 months in beginning of 2020, where I attended intensive German classes everday. This helped me got Telc certificates with B2 level.
Stayed at least 5 years in Switzerland
This one is obvious. Note that you don't have to have stayed in the same canton.
Unlimited contract and at least 1 year B workpermit
This used to be that you needed to have hold B (both work permit and student permit) for consecutive 5 years, then you can apply. But it's no longer the case since 2021 or so.
Your salary can also not be lower than market average for your position. I had friend who couldn't get C, despite all other requirements are met, but his salary wasn't enough. Because he was boostrapping his startup.
Human factor
In the end, in my experience, it largely boils down to the people who is processing your case. This is surprise, but it's true
If you have met the requirements for German certificate and Employment Contract, and you've stayed here for at least 5 years, then no matter if you had 2 year with working B permit or not, it's worth trying.