I just want to give little more context to my first reply. If a person has work visa (H1, L1, R1... etc) and if the person married to US citizen while working in the USA, then it is absolutely OK to file AOS through I-485. Because work visa is considered to be dual intent. Also practically I did one last year. Once again, if it is a work visa and if the person married to US citizen in USA.
If a person is in visit visa, then this this step called fraud. Because visit visa (b1/b2) is NOT dual intent. It is only for visit, not to proceed for immigration purpose.
Hope this clears some confusion .