So What Happens when you Hit that Compile Button?

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? πŸ™‚

This entry was posted in How Far is Too Far?, M3 / MoveX. Bookmark the permalink.

One Response to So What Happens when you Hit that Compile Button?

  1. Paul Grooby says:

    Nice – beats trying to point reflector at the whole app whiles it running πŸ™‚

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s