Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit ba76a4d

Browse files
committed
add fallback for dynamic assemblies
1 parent 74a6874 commit ba76a4d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/ServiceStack.Text/PclExport.Net40.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,16 @@ public override void VerifyInAssembly(Type accessType, ICollection<string> assem
466466
//might get merged/mangled on alt platforms (also issues with Smart Assembly)
467467
if (assemblyNames.Contains(accessType.Assembly.ManifestModule.Name))
468468
return;
469-
if (assemblyNames.Contains(accessType.Assembly.Location.SplitOnLast(Path.DirectorySeparatorChar).Last()))
470-
return;
469+
470+
try
471+
{
472+
if (assemblyNames.Contains(accessType.Assembly.Location.SplitOnLast(Path.DirectorySeparatorChar).Last()))
473+
return;
474+
}
475+
catch (Exception)
476+
{
477+
return; //dynamic assembly
478+
}
471479

472480
throw new LicenseException(LicenseUtils.ErrorMessages.UnauthorizedAccessRequest);
473481
}

0 commit comments

Comments
 (0)