あなたが持っているものは.NET 4.0で動作しますが、残念ながら.NET 3.5では動作しません. 代わりに XamlTypeMapper を使用してみてください。
var context = new ParserContext();
context.XamlTypeMapper = new XamlTypeMapper(new string[] { });
context.XamlTypeMapper.AddMappingProcessingInstruction("", "Farm", "Farm");
XamlReader.Parse("<Pig/>", context);
名前空間プレフィックスを使用する場合は、XamlTypeMapper を使用して clr 名前空間から xml 名前空間へのマッピングを宣言し、xml 名前空間の名前空間プレフィックスを宣言できます。
var context = new ParserContext();
context.XamlTypeMapper = new XamlTypeMapper(new string[] { });
context.XamlTypeMapper.AddMappingProcessingInstruction("Foo", "Farm", "Farm");
context.XmlnsDictionary.Add("a", "Foo");
XamlReader.Parse("<a:Pig/>", context);