I got bitten by this problem once too...
Referencing the assemblies isn't enough. WPF needs to call System.UriParser.Register()
with its own URI parser so that System.Uri
can interpret pack URLs.
Reflecting tells us that this is done by the static constructor of System.IO.Packaging.PackUriHelper
. Call any method of this class in your test, like PackUriHelper.Create()
to ensure the URI parser is well registered. Kind of ugly, but should work.
Julien Lebosquain
2010-09-14 16:33:46