Cannot compile code with project configured for PTX output When I try to compile any project se

Dear Experts!

I need to generate a ptx file from my CUDA code. When I create a CUDA project and compile it with NVCC Compilation type set as “Generate .ptx file (-ptx)”, I get the following error:

1>------ Build started: Project: PTXTest, Configuration: Debug Win32 ------
1>Compiling with CUDA Build Rule…
1>“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin\nvcc.exe” -G0 -gencode=arch=compute_12,code="sm_12,compute_12" --machine 32 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin” -Xcompiler “/EHsc /W3 /nologo /O2 /Zi /MT " -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\include” -maxrregcount=0 --ptxas-options=-v -ptx -o “Debug/kernel.cu.obj” kernel.cu
1>kernel.cu
1>kernel.cu
1>tmpxft_000073a4_00000000-3_kernel.cudafe1.gpu
1>tmpxft_000073a4_00000000-10_kernel.cudafe2.gpu
1>Linking…
1>LINK : F:\Data\PTXTest\Debug\PTXTest.exe not found or not built by the last incremental link; performing full link
1>.\Debug\kernel.cu.obj : fatal error LNK1107: invalid or corrupt file: cannot read at 0x25DF
1>Build log was saved at “file://f:\Data\PTXTest\PTXTest\Debug\BuildLog.htm”
1>PTXTest - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Can anybody help me on this. Its urgent.

Thanks a lot