you have two questions.
Q1: How do I clear the %tmp% folder in VS 2012?
Answer: VS 2012 has no temporary files that you can delete. You might have some being created by your program but that would be in VB.Net or C#. You have not told us which. Either way, you shouldn't.
The point of the %tmp% folder is that the files will only exist as long as they need to. As soon as the var that uses the file goes out-of-scope, then the GC will clean it up for you on the next pass.
Why do you ask? Are you having problems with temp files?
Q2: How do I locate a NullReferenceException?
There should be a Stack Trace with the error. This should tell you where the exception occurred, but it does not tell you what item was null. Usually it's obvious but sometimes it a little more obscure. I suggest you use the stack-track to locate the likely null candidate and add some error checking beforhand.
var myvar = somemethod();
This is how I handle any possible null value.