Ask an Immigration Solicitor. Get an Answer ASAP.
Welcome to Just Answer, I will be assisting with your question today. Please note that my support on this site is for general information only and there is no intention to create a legal relationship. Thank you!
Thanks for your patience.
1. You can switch to a spouse visa from within the UK
2. You can stay as a dependant
3. Your 2 years at graduate visa will certainly count towards 10 years long residence.
May I ask what will be the main applicant's status when you are planning to switch as a dependant?
You should be able to apply as his dependant if all the following apply: https://www.gov.uk/student-visa/family-members
You could also switch to a skilled worker visa yourself if eligible at that time, it will also count towards your 10 years of legal residence.
Is there anything else I can help with?
If you would like to ask me another question in the future, you can add me as a favorite Expert. You'll have the option to do that on your "My Questions" page.