So I have been writing my thesis for 2 months it had been working perfectly lets call that file thesis.tex . Then, in order to use the template of my university I had to update MikTex also I installed new packages.(I installed those packages by using a completely separate tex file (let it be trial.tex). I did not make any change at all to thesis.tex).
Any way after that, when I tried to compile thesis.tex it started to give can't write on 'Filename.pdf' error. Note that I absolutely did not change any thing in thesis.tex nor in the folder that thesis.tex is in.
Thus, after installing new packages and updating miktex previously, completely working .tex files now gives that error.
It is very annoying I wasted hours today on this and actually I finished writing my thesis and about to submit it, I just wanted to update miktex and change the template of it before submitting, but now I can't compile thesis.tex which was working flawlessly.
It is very urgent because the deadline is very close. I tried to pause one drive, drop box. Restarted Tex studio, empty disc space. It is not working. Also, when I try to compile trial.tex it also gives cant write on trial.pdf error even if there is and was never trial.pdf.
edit: If I try to compile it in cmd with
I get the error
I can't write on file thesis.pdf please choose another file name:
than I choose another name again it gives same error in infinite loop