Telerik ships Sitefinity CMS v3.1 Telerik has unveiled version 3.1

December 2, 2007 – 12:00 am

Telerik ships Sitefinity CMS v3.1
Telerik has unveiled version 3.1 of Sitefinity CMS for construction and management of web sites. Coming hot on the heels of version 3.0, Sitefinity v3.1 provides integrated search engine, forums module, updated RSS service and a number of UI improvemen…

iPhone on Silverlight Promo Video?

On the Silverlight promo video did anyone notice one of the actors using a device that looks for all the world like an Apple iPhone? ;-)

 

Talking of the iPhone. Since its OS is based on a slimmed down version of OS X - I wonder if we can expect to see Silverlight running on the iPhone some point in the future?

Using TestDriven.NET with XNA Game Studio Express

Henning Degn recently contacted me with a problem he was having running XNA code from TestDriven.NET. The code would run fine when executed from the application’s ‘Main’ method. However when executing it as an ad-hoc test from TestDriven.NET he was seeing the following exception:

Microsoft.Xna.Framework.Content.ContentLoadException: Error loading “Content\myTexture”. File not found. —> System.IO.DirectoryNotFoundException: Could not find a part of the path  ’C:\WINDOWS\assembly\GAC_32\Microsoft.Xna.Framework\1.0.0.0__6d5c3888ef60e27d\Content\myTexture.xnb’

It turns out that XNA tries to load its content files from a directory relative to the ‘Assembly.GetEntryAssembly()’ code base. The problem occurs when no ‘Main’ method is called (which happens when an ad-hoc or unit test executed) and no entry assembly is set. When this happens XNA defaults to using ‘Assembly.GetCallingAssembly()’ instead. Unfortunately the calling assembly is ‘Microsoft.Xna.Framework’ which is located in the GAC.

What we needed to do was find a way to set the entry assembly. Henning has documented our solution here. It basically involves calling a utility method ‘AssemblyUtilities.SetEntryAssembly()’ the beginning of each test.

Happy game development. :-)

Note: You will need TestDriven.NET 2.5 Beta or greater for XNA Game Studio Express support.

Silverlight Browser on CodePlex

Last week Ernie Booth announced a SilverlightBrowser plugin for Reflector. The plugin allows you to browse web pages that contain Silverlight elements and display their constituent Javascript, XAML and assembly files.

 

Ernie released the 0.1 Alpha code so people were free to modify it. The way the 0.1 code obtained the .js, .xaml and .dll files was by searching the HTML and Javascript source for specific patterns. For example it would search the HTML file for ‘Silverlight.createObject’ and extract the .xaml link from its parameters. This is similar to how Lutz’s SilverlightLoader plugin works.

The problem with this technique is that it assumes that the ‘Silverlight.js’ and API (which comes with the Silverlight SDK) is being used. Unfortunately this won’t always be the case. Some people may include the <object> or <embed> tags directly in the HTML or embed the XAML in a <script> block. A good example of this is Sam Ruby’s Inline SVG in MSIE demo. This demo creates a Silverlight <embed> element and converts the SVG content into XAML on the fly!

I’ve modified Ernie’s code so that is searches the WebBrowser object model for the .js and .xaml files. This means it is no longer making the assumption that ‘Silverlight.js’ is being used. It doesn’t yet support XAML that is emended in a <script> block. I’m hoping to have it working with Sam’s demo in the next version.

I have kicked off a community project for the SilverlightBrowser plugin on CodePlex (with Ernie’s blessing). You can download latest version of the plugin from here.

You must be logged in to post a comment.