I'm in the rather
grueling awesome process of tech reviewing my friend Pete Brown's new book, Silverlight 5 In Action. As a part of that, I had to get setup with the Silverlight 5 Toolkit in order to get the new 3D templates.
Frankly, I'm rather excited at the prospect of playing around with 3D stuff in Silverlight. We've come a very long way since the days of just displaying simple things like a clock in a browser plugin.
So, I install the toolkit and start up Visual Studio 2010 and choose a Silverlight 3D Application
I called my project “Silverlight3dExample”. Now, Visual Studio fires up the hamsters in their wheels and all the other rube goldberg-esque machinations inside and comes up with this lovely tandem of errors:
So, after a bit of googling, I realized, much to my chagrin, that I neglected a rather important notice on the screen of the Toolkit:
Note: You must install XNA Studio in order to use the new Silverlight 3D templates.Otherwise the new templates will not show up.
Oh.. uhh.. oops. Seems kind of odd that such a big missing prerequisite isn’t also detected by the installer, but, whatever…
So, I download XNA studio and install that… more whirring, banging from my machine ensues. Then, just in case things won’t recover gently, I decide to create the solution from scratch again. After all, I hadn’t done anything yet.
Woohoo! all 4 projects successfully created!
Sweetness, right!? So, I hit Ctrl-Shift-B (build command for you mouse-using pansies out there) and voila, everything builds! Just kidding! Now, I get this obvious and very helpful error:
Compile error -2147024770
(0, 0): error : Unknown compile error (check flags against DX version) D:\Dev\Book…Silverlight3dExample\Silverlight3dApp\CustomEffect.slfx
Umm.. OK.. Googling… googling… uh… yeah… Apparently, there’s another prerequisite missing that the installer also doesn’t check for: DirectX 9. So, I download that and install (cringing at every single “installing XX update from 2006” message – how can that really not break my machine?).
Finally, it actually builds! No thanks to the Silverlight Toolkit guys (well, some thanks, since they wrote it in the first place!), I can now continue to review this chapter of what really is a pretty killer book, you should buy it. Now.