Skip to content

Commit baed9a1

Browse files
authored
Merge pull request #1814 from AutoMapper/Issue1697
Filtering dynamic assemblies
2 parents eb1a445 + c11b1e9 commit baed9a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AutoMapper/Configuration/MapperConfigurationExpression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void AddProfiles(params Type[] typesFromAssembliesContainingProfiles)
5858

5959
private void AddProfilesCore(IEnumerable<Assembly> assembliesToScan)
6060
{
61-
var allTypes = assembliesToScan.SelectMany(a => a.ExportedTypes).ToArray();
61+
var allTypes = assembliesToScan.Where(a => !a.IsDynamic).SelectMany(a => a.ExportedTypes).ToArray();
6262

6363
var profiles =
6464
allTypes

0 commit comments

Comments
 (0)