Compile error MSB3721 due to code generation in vs2012

Hi colleagues.
I met the compile error when build cuda project in vs2012.
My project has no problem when setting code generation with capability_10, sm_10,
But it produces compile error MSB3721 when setting code generation with capability_20, sm_20, or any over 10 making fatal error “Ptx assembly aborted due to errors”.
I am in frustrated.
Anyone help me? Thanks in advance.

I’m having same problem. What I found is that my code compiles when i switch off -G option for the compiler.