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.
xna game studio 3.1??
ReplyDeleteSorry for the late response, this notification was in my SPAM folder.
ReplyDeleteActually, it was 4.0, if I remember correctly.
for me it doesn't work even after installing xna game studio 4.0 I still cant make this 3d silverlight template work, program cannot load content from web and app projects. I tested it on web developer 2010 express, visual studio 2012 express web and visual studio 2012 pro trial.
ReplyDeleteany idea what I am missing? I installed everything what was available in microsoft web side ^^ why installer do not telling me whats missig... that's a question....
@Lord Raven
ReplyDeleteXNA Game Studio doesn't currently work with Visual Studio 2012/.NET 4.5. If you had either installed *before* you installed GS4, you may have run into installer problems.
I encourage you to ask on the forums at Silverlight.net and provide details as to the exact problems you're running into.
Pete Brown
Microsoft