Skip to content

Commit 40e1d3d

Browse files
committed
Type.GetType fails with typeName argument in silverlight (incorrect format). More info here: http://stackoverflow.com/questions/3068131/how-to-load-a-type-from-a-referenced-assembly-at-runtime-using-a-string-in-silv
The code below still handles type resolution.
1 parent 6ebd159 commit 40e1d3d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ServiceStack.Text/AssemblyUtils.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ public static class AssemblyUtils
2828
/// <returns></returns>
2929
public static Type FindType(string typeName)
3030
{
31+
#if !SILVERLIGHT
3132
var type = Type.GetType(typeName);
3233
if (type != null) return type;
33-
34+
#endif
3435
var typeDef = new AssemblyTypeDefinition(typeName);
3536
if (!String.IsNullOrEmpty(typeDef.AssemblyName))
3637
{

0 commit comments

Comments
 (0)