Skip to content

Releases: AutoMapper/AutoMapper

6.0.2

22 Mar 14:17
Compare
Choose a tag to compare

Removed the unused ValueTuple dependency

6.0.1

20 Mar 13:37
Compare
Choose a tag to compare

Stupid assembly version was missing.

6.0.0

16 Mar 13:34
Compare
Choose a tag to compare

As part of this release we had 62 issues closed.

List of breaking changes:

5.2.0...6.0.0

Features

  • #1916 Provide an alternative to using ProjectTo() and static initialization…
  • #1906 Support older collection types
  • #1883 Add Advanced property and put BeforeSeal function in it
  • #1876 Add a per member option DoNotInline
  • #1866 Need to get ProfileConfiguration before sealed
  • #1848 Avoid static state; Mapper registry managed through mapper configuration

Improvements

  • #1957 5.2.0 issue value type projection expression
  • #1956 ProjectTo<>(...,Expession<<>>[]membersToExpand): lambda for a Value Type causes NullReferenceException
  • #1933 Exclude more system base types
  • #1930 Concurrency
  • #1922 Remove DoNotUseDestinationValue
  • #1919 Custom config validation
  • #1913 Inherit ignore unless overriden in the derived map; fixes #1910; fixe…
  • #1910 inheritedMapper for map to a existed object is not working right.
  • #1895 Use ReverseTypeMaps when configuring closed generic TypeMaps
  • #1889 Multiple value resolver interfaces
  • #1887 To support resolver that implements multiple IValueResolver interfaces
  • #1877 Handle fields too; fixes #1875
  • #1875 Simple ProjectTo throws Exception, stating an incorrect Property type
  • #1872 Match on requested types if runtime types don't match; fixes #1865
  • #1865 Mapping nullable does not use nullable map when called with a non-null value
  • #1861 Add link to BuildExecutionPlan
  • #1860 Add a link to the wiki
  • #1844 Expose the execution plan
  • #1842 AutoMapper.Debugging
  • #1822 Just look for IMemberValueResolver; fixes #1813
  • #1813 Interfaces derived from IMemberValueResolver<,,,> break BuildValueResolverFunc
  • #1732 Inherited Ignore Ignored

Bugs

  • #1991 We need the lock
  • #1931 AutoMapper 4.1.1 -> 5.2.0 Dynamic Enum Mapping differences
  • #1911 fix for issue 1886 and unit test in SourceInjectedQuery class
  • #1908 Missing property name on AssertConfigurationIsValid exception
  • #1905 InvalidOperationException when mapping IList to CollectionBase via ResolveUsing
  • #1901 Preserve references
  • #1892 Best way to preserve compatibility for v4 to v5 upgrade
  • #1890 Correct order of ExpressionBinders
  • #1886 Mapping of Expression<Func<T,bool>> causes exception starting from AutoMapper 5.2.0
  • #1879 QueryableExtensions: NullableExpressionBinder used in preference to CustomExpressionBinder
  • #1863 Default enum value to string
  • #1862 Mapping Enum to string - default enum value get mapped to null
  • #1858 Make the constructor parameter resolver type safe; fixes #1857
  • #1854 Preserve references bug
  • #1847 InvalidOperationException : ValueFactory attempted to access the Value property of this instance.
  • #1834 Always null check
  • #1833 Auto-flattening null reference exception
  • #1831 Somehow arrays are different :); fixes #1830
  • #1830 Mapping Class to Derived DynamicObject gives NullReferenceException
  • #1828 Avoid casts; hopefully they are not needed; fixes #1827
  • #1827 Automapper throws exception with ProjectTo and EF6
  • #1819 Add required casts for non generic ResolveUsing
  • #1818 Box once to keep object identity; fixes #1816
  • #1816 Regression between Automapper 4 and 5
  • #1794 Performance issues and PreserveReferences not working correctly

Where to get it

You can download this release from nuget

5.2.0

23 Nov 23:52
Compare
Choose a tag to compare

As part of this release we had 74 issues closed.

Features

Improvements

  • #1809 Check the destination type override to be a derived type
  • #1753 Expose the destination member
  • #1746 Make IncludeBase work with ReverseMap
  • #1745 Add .editorconfig
  • #1743 ReverseMap ignores mapping inheritance (AutoMapper 5.1.1)
  • #1734 Compile once
  • #1719 Add some helpful casts
  • #1714 Always map array contents & remove the primitive array mapper.
  • #1687 Make it easier to spot missing services
  • #1677 Lazily create convert expressions
  • #1655 UWP 5.2.2 + AutoMapper 5.1.1 = Insanely long builds
  • #1628 Match by name; the member type can be generic and so the types won't …
  • #1624 InvalidOperaionException when automapping using open generics and including the source in a ForMember statement
  • #1530 Make constructor mapping a little more lenient
  • #1528 Invalid constructor mappings throw exceptions at seal-time

Bugs

  • #1814 Filtering dynamic assemblies
  • #1812 Applying partially trusted callers only for full .NET
  • #1806 Catch NRE in MapFrom with value types; fixes #1798
  • #1805 Return null when mapping from null string to nullable
  • #1804 string -> int? conversion returning 0 rather than null
  • #1798 In AutoMapper 5.1.1 MapFrom method does not ignore Null Reference Exception but throws it
  • #1788 Checking for closures (constant expressions) when mapping expressions
  • #1785 Fixing expression visitors to properly visit the underlying expressio…
  • #1778 MapFrom variable 'src' of type 'Xyz' referenced from scope '', but it is not defined
  • #1774 Mapping from "string" to "nullable enum" throws exception
  • #1772 Map string to nullable enum
  • #1765 Fix #1482
  • #1764 MapFrom/ResolveUsing no longer support null assignment
  • #1752 Consider VB closures
  • #1748 Paramterized mappings not working using VB.NET and Profiles
  • #1740 Mapping to/from object doesn't seem useful
  • #1731 Bugfix #1727
  • #1727 Automapper v5.1.1 does not work with ObservableDictionary where Automapper 4 does
  • #1718 When we map a nullable, we should map the underlying type unless an e…
  • #1717 Mapping from nullable enum stopped working in AutoMapper 5
  • #1711 Multiple IEnumerable interfaces
  • #1697 AddProfiles Blows Up With NotSupportedException if Any of the Assemblies are Dynamic
  • #1692 Fixed memory leaks
  • #1691 ConcurrentBag causes memory leak
  • #1685 MethodAccessException: Windows Phone 8.1 (WinRT)
  • #1672 Not needed code - nullables
  • #1664 Differentiation between type and nullable type
  • #1662 Get the element type from the destination object itself
  • #1656 Creating a map for collections throws when destination items of derived type
  • #1654 Short-circuit evaluation
  • #1651 Complex flattening
  • #1649 Convert the null substitute to what's needed for projections
  • #1645 Dictionary mappings no longer handle non-empty dictionary destinations in 5.1.1
  • #1642 Convert to nullable
  • #1641 Different ProjectUsings for nullable and non-nullable ints
  • #1638 Decimal to nullable decimal
  • #1635 Call the condition after setting the source property value because it…
  • #1634 Conditions do not get either Source or Destination values
  • #1632 Just clear the destination everytime we don't create it ourselves
  • #1631 NullReferecnceException when flattening values
  • #1630 Mapping onto existing object does no longer clear existing items from List [5.1.1]
  • #1626 Don't hard code the ToString call, use the StringMapper; remove the t…
  • #1620 Mapping object to string fails with NullReferenceException when called on null.
  • #1618 Profile.AllowNullCollections ignored?
  • #1617 Error when mapping an expression containing a (non-parameter) instance of the mapped type
  • #1607 IMemberValueResolver is created and called twice
  • #1482 UseAsDataSource Translate constants with PropertyMap changes.
  • #1008 UseAsDataSource() - filtering by date in OData query results in mapping exception
  • #882 UseDataSource() with property-path expression leads to exception

Where to get it

You can download this release from nuget

5.1.0

12 Aug 03:53
Compare
Choose a tag to compare

As part of this release we had 57 issues closed.

Features

  • #1573 Base class for simple object mappers that don't want to use expressions.
  • #1572 Constructor tests with prefixes and postfixes for source and destination
  • #1568 Profile scanning
  • #1253 Recognize pre/postfixes in ctor args

Improvements

  • #1559 Add an AllowNull configuration
  • #1557 Inline the easy cases
  • #1549 Break long line in AutoMapperConfigurationException
  • #1547 [aestethic] Missing newline in AssertConfigurationIsValid output
  • #1533 Portable profile 111 support
  • #1527 Better exception messages
  • #1512 Configuration faster
  • #1493 Enumerators
  • #1377 Inline sub map expressions
  • #1001 Expression.NotEqual causing an exception when using queryable projections

Bugs

  • #1612 Automapper is actually built with debug flags / non optimized when building in release mode.
  • #1602 Don't fail when the parameter name is null
  • #1601 Map from null interface
  • #1588 Struct with collection
  • #1579 The null substitute should have the same type as the value resolved
  • #1578 Using NullSubstitute with different source/destination types throws ArgumentException
  • #1567 Consider the underlying nullable type a related type when resolving t…
  • #1566 ConvertUsing from value type to the same value type doesn't work
  • #1558 Resorting to nuspec because of nuget weirdness
  • #1555 Don't allow duplicate After/Before Map registrations
  • #1554 Add a null guard instead of rewriting each node
  • #1552 5.0.2 Can't create map where source is DateTime.Date
  • #1550 Update to 5.0.2 broke existing maps
  • #1538 Map to existing object
  • #1537 Convert using to string
  • #1529 Possible regression: AutoMapper 5.0.2 calls ToString() where 4.x didn't
  • #1523 Reuse the default context even only when MaxDepth and PreserverRefer…
  • #1522 ExpandoObject is a dictionary and should be mapped as such
  • #1520 Fix #1518
  • #1519 Added failing unit test for #1518
  • #1518 Index was outside the bounds of the array.
  • #1516 Multiple destination type maps for the same source type fails and uses the first type instead when PreserveReferences is specified.
  • #1511 Revert the order of the binders; I'm guessing this is the root cause …
  • #1509 Projecting EF queryables with AllowNullCollections throws exception
  • #1508 Only doing null fixing on custom member mappings when there are only …
  • #1505 Exception when configuring mappings (worked in 4.2.1)
  • #1502 Fixes #1495
  • #1498 Fixes #1497
  • #1497 Automapper 5.0.2: Expression mapping
  • #1495 Automapper 5.0.2: System.Guid and TryExpression
  • #1494 Better match condition for enumerables
  • #1491 Issue with One to Many mappings in 5.0.2
  • #1490 Allow overriding the global ignore; fixes #1488
  • #1489 Handles the case when the resolver doesn't directly implement the res…
  • #1488 Broken changes in 5.0.2; AddGlobalIgnore cannot be overriden by specific mapping configuration
  • #1487 Configuration definition raises ArgumentNullReference in 5.0.2
  • #1486 Problem with mapping DTOs onto their POCO class in 5.02
  • #1357 AfterMap()/BeforeMap() getting invoked multiple times
  • #925 NotSuportedException when mapping entities with complex types using AutoMapper and Entity Framework

Where to get it

You can download this release from nuget

5.0.2

07 Jul 18:48
Compare
Choose a tag to compare

Fixed NuGet problem for UWP apps

5.0.1

07 Jul 15:03
Compare
Choose a tag to compare

As part of this release we had 60 issues closed.

Features

Improvements

  • #1466 Validating constructor mapping as part of configuration validation
  • #1457 AutoMapper 5.0.0 introduces runtime errors that AssertConfigurationIsValid doesn't catch
  • #1456 AutoMapper fails to map class with non-default constructor
  • #1452 Open generics allow any member configuration; removed a ton of dead c…
  • #1451 Inheriting resolvers from base maps
  • #1450 Adding back in destinations for value resolvers; Added new member val…
  • #1445 Restoring destination value in type converters
  • #1444 ResolveUsing<> not being inherited by IncludeBase<>
  • #1415 Better error message
  • #1412 Avoid boxing when calling before/after map actions
  • #1411 Restoring easy static config validation
  • #1392 Update copyright year in readme

Bugs

  • #1478 Fixing pack options to include PDBs and XML docs
  • #1476 If all we got from the constructor was a default value, try property …
  • #1475 Bug: Ctor with default values overrides mapped values (Automapper 5.0.0)
  • #1473 Bug: AutoMapper 5.0 nuget doesn't contain xml files with documentation
  • #1471 Fixes #1469; Removed not needed accessor code
  • #1470 Correctly setting null type for allowing null collections
  • #1469 Null flattening has changed in 5.0
  • #1468 Using the resolve value expression to determine how to map member ins…
  • #1467 ArgumentException when mapping from IEnumerable to T[] when AllowNullCollections is on
  • #1463 Map only the dynamic members necessary
  • #1458 Fixes #1453
  • #1453 Mapper.Initialize throw ArgumentNullException
  • #1437 ProjectTo stack overflow
  • #1434 Fixes #1417
  • #1433 5.0.0 - AutoMapper.QueryableExtensions Project fails when source and destination contain MS-SQL timestamp
  • #1430 Expando object bug
  • #1429 Create missing map circular reference
  • #1427 Calling ForMember with open generics throws NullRef
  • #1423 On .NET Core, Length is not a property of string[] for example; a bug…
  • #1422 StackOverflowException related to CreateMissingTypeMaps and AddConditionalObjectMapper
  • #1421 Make Condition like pre-condition with IfThen
  • #1418 Can't map between Lists
  • #1417 Not all members are being mapped
  • #1413 Conditional Mapping Issue (vers 5.0)
  • #1402 Catch NRE in MapFrom; closes #1382
  • #1401 IfNullVisitor memory leak
  • #1400 Fixes #1380
  • #1397 Closes #1389
  • #1396 Fixes #1394
  • #1394 Automapper 5.0.0 can map flags enum to nullable flags enum
  • #1393 Can't configure mapping where source and destination have byte[] properties
  • #1391 Preferring type map even if a mapper matches for property maps
  • #1389 This operation is only valid on generic types
  • #1388 Explicit dependencies
  • #1385 Fixed all sorts of nuget problems
  • #1384 CreateMissingTypeMaps sets properties of complex objects to null
  • #1382 MapFrom not applying Null Checking all of the way in 5.0
  • #1381 Fixes #1379
  • #1380 Additional Type Checks still run after ConvertUsing in 5.0
  • #1379 ITypeConverter from int/int? to bool throws exception in 5.0 but works in 4.2.1
  • #1378 Complex mapping fails in 5.0
  • #1352 UseAsDataSource StackOverflow Error
  • #1342 Map Automatic Property to ExpandoObject causes many k__BackingField member
  • #1131 Automapper fails when using .NET Native - Part 2

Where to get it

You can download this release from nuget

5.0.0

28 Jun 03:53
Compare
Choose a tag to compare

As part of this release we had 58 issues closed.

Features

  • #1374 Supporting .NET Core RTM
  • #1340 Net standard 1.3 Support
  • #1321 Don't map through properties members mapped through the constructor
  • #1304 Configuration expression separating
  • #1300 AutoMapper 4.2.1 Abstract Mapping Issue

Improvements

  • #1370 Reuse the context when it's generic
  • #1360 Make As work with generics; fixes #1349
  • #1359 Fixes #1350
  • #1356 Try to skip the security check
  • #1354 Inline the lambdas as necessary
  • #1351 Simplify Resolution Context
  • #1349 The interface has a conflicting property ID Parameter name: interfaceType
  • #1345 Remove null checks from map when src allready checked
  • #1344 Better Array Mappings
  • #1336 Ignore explicit interface implementations with no setter
  • #1333 IgnoreAllPropertiesWithAnInaccessibleSetter throws ArugmentOutOfRangeException when destination has explicit interface implementation property
  • #1332 A typo and some unnecessary work
  • #1319 Avoid calling IsDictionaryType because it allocates
  • #1315 Eliminate some allocations and some refactoring
  • #1306 Share the context between property mapping and constructor mapping
  • #1303 Reuse the context for properties and constructor parameters
  • #1294 Do not catch exceptions inside Resolve; closes #1293
  • #1293 5.0 Beta1 will swallow exceptions
  • #1290 Reuse the context for collections
  • #1288 Resolve using with different types
  • #1284 Make seal last and move newing up create map functions before do config and seal.
  • #1282 Use casting instead of DynamicInvoke

Bugs

  • #1373 Map from nullable source; fixes #1372
  • #1372 Value lost when mapping from Nullable to Nullable
  • #1371 Define NET45 in debug too; this caused the System.FieldAccessExceptio…
  • #1369 Specify the type of the parameter for missing map exception
  • #1367 Test-case for #1366
  • #1366 Strange exception if trying to map unmapped type.
  • #1364 Fix buildOptions
  • #1363 project.json contains wrong json element for signed dll's
  • #1355 Use type maps in item mapping for collections if exists
  • #1338 Allow overriding the built in object mapper with a custom type converter
  • #1337 Eliminate duplicate extension methods; fixes #1297
  • #1330 Error trying to map System.Collections.Immutable.ImmutableDictionary
  • #1314 Allow custom resolved values to validate; I didn't try to get the typ…
  • #1308 Test for #1307
  • #1305 Fixing bug on mapping null objects
  • #1302 Passing NULL objects to mapper.Map() raises exception
  • #1297 AutoMapper 5.0.0-beta-1 with ASP.NET Core RC2 throws System.ArgumentException: An item with the same key has already been added
  • #1289 Mapping structs

Where to get it

You can download this release from nuget

5.0.0-beta-1

17 May 03:32
Compare
Choose a tag to compare
5.0.0-beta-1 Pre-release
Pre-release

As part of this release we had 93 issues closed.

Features

  • #1278 Supporting official RC2 bits
  • #1274 Dot not core rc2
  • #1210 Implement ResolveUsing for constructor parameters
  • #1209 Constructor mapping doesn't honor ResolveUsing
  • #1207 Implemented mapping between open generic and nongeneric or closed generic types
  • #1072 Argument type 'IMapper' is not CLS-compliant
  • #1055 Remove all obsolete static APIs
  • #1049 ForAllOtherMembers #602
  • #922 Allow disabling the default naming convention
  • #611 Fixes #602: Added ForAllOtherMembers implementation. Not sure how I should do ...
  • #602 FR: ForAllOtherMembers

Improvements

  • #1280 Adding convenience property for easier access to context items
  • #1275 Finish IObjectMapExpression conversions
  • #1263 Default value for Guid; fixes #1254
  • #1251 Expand object mappers to provide expression-based mapping
  • #1245 Switching construct using to use expressions
  • #1244 Generic type converter with two type parameters
  • #1243 Generic mappers
  • #1222 Expression optimization
  • #1211 Property map mapping via compiled expressions
  • #1186 Base interface members
  • #1185 Make the null substitute type safe
  • #1184 Can not map inherited property by its name
  • #1181 ProjectTo throws an exception when an interface is mapped with a base-interface property mapping
  • #1172 Disable the cache by default
  • #1152 Property map performance enhancements
  • #1130 Small changes to expression-binding behaviour II
  • #1103 Extension methods per type
  • #1096 Add DestinationType back into resolving member info conventions. Part 2
  • #1090 Restore some static api
  • #1086 Configuration Overhaul
  • #1081 Make create mapper more pure
  • #1079 Fixes #1077
  • #1077 4.2.0 .Include<DerivedSourceType, DerivedTargetType> throws exception with base type names
  • #1060 Passing test; closes #944
  • #1056 Add DestinationType back into resolving member info conventions.
  • #1050 Added sorting of interfaces (2)
  • #1007 Add methods to streamline member resolution using ResolutionContext.Options.Items
  • #1004 Add an AllowNull configuration
  • #1001 Expression.NotEqual causing an exception when using queryable projections
  • #944 Open generic mappings failed with derived types
  • #938 Complex types bug 925
  • #852 Small changes to expression-binding behaviour

Bugs

  • #1281 Pre and post fixes now case insensitive
  • #1265 Always generate typed mapping funcs
  • #1240 MapFrom should override matching source member
  • #1237 The wrong null check now that Types is a value type
  • #1236 DoNotUseDestinationValue should work for value types too
  • #1230 Inherit the mapping order
  • #1217 Flatten nested children using ProjectTo
  • #1216 Flatten nested children using ProjectTo
  • #1204 Use the runtime type of the source object when mapping collections
  • #1203 Dynamic mapping in 4.2.1 not behaving as expected
  • #1198 Include recursively all the base maps
  • #1197 Condition override custom resolver defined in inherited mapping.
  • #1093 When using resolve, infer the type of the resolved value
  • #1089 Fix the generics test
  • #1075 IncludeBase failure in 4.2 (worked in 4.1 and below)
  • #1059 Compile the mapping lambda for the constructor argument; closes #1047
  • #1048 Passing test for #1046
  • #1047 Problem with mapping constructor arguments from nested classes
  • #1046 Mapping to base class does not work
  • #1024 Faling test for #1023
  • #999 Broken inheritance after upgrading to version 4.1.1 (in RELEASE mode only)
  • #967 Prefix/Postfix property matching is now case sensitive

Where to get it

You can download this release from nuget

4.2.1

24 Feb 19:48
Compare
Choose a tag to compare

As part of this release we had 2 issues closed.

As part of this release Mapper.Map and Mapper.Initialize are no longer obsolete. These will be supported going forward.

Mapper.CreateMap is still obsolete and I will kill it with fire.

Improvements

  • #1139 Restores Mapper.Initialize and Mapper.Map
  • #1138 Restore Mapper.Initialize and Mapper.Map

Where to get it

You can download this release from nuget