After winding down from upgrading one of our primary servers to VMware 5, I thought I’d have a little look at seeing if I could figure out how to use delegates in a Jscript when I came across a very odd wee error “System.IO.FileNotFoundException: Could not load file or assembly ‘file:///C:\Users\Scott\AppData\Local\Temp\df5xdu2m.dll’ or one of its dependencies. The system cannot find the file specified.
File name: ‘file:///C:\Users\Scott\AppData\Local\Temp\df5xdu2m.dll'”
Being curious I thought, huh? I compiled a different script and the error went away, compiling my delegate test script it came back so off I dutifully went to my temp directory to have a look at this file. Fairly small and then it clicked! But I figured I’d double check to make sure what I thought I saw was infact actually happening. I compiled a large script and the file changed its size considerably.
Getting a little excited (I had wondered about where scripts go when you compile them but had just been too lazy to fire up process monitor to look) I pointed Visual Studios Object browser at the .dll and was pleasantly surprised.
This was effectively my compiled class.
So, it looks like when you hit that compile button Smart Office will compile the file in to a .dll in your temp directory, it will then presumably bind to that .dll file when you hit the run button.
Pretty nifty eh? 🙂