Thank you for your reply. I tried to include /clr in the compiler option but I got the following error:
cl : Command line error D8016 : '/EHs' and '/clr' command-line options are incompatible
I realized that /clr does not support /EHs and the right command line option for it is /EHa. I was trying to include /EHa in the compiler option but it didn't solve the problem.