diff --git a/src/FlatMapper/DynamicMethodCompiler.cs b/src/FlatMapper/DynamicMethodCompiler.cs index cacbd42..dd03ea7 100644 --- a/src/FlatMapper/DynamicMethodCompiler.cs +++ b/src/FlatMapper/DynamicMethodCompiler.cs @@ -1,4 +1,5 @@ using System; +using System.Linq; using System.Reflection; using System.Reflection.Emit; @@ -18,7 +19,8 @@ public static class DynamicMethodCompiler internal static Func CreateInstantiateObjectHandler() { Type type = typeof (T); - ConstructorInfo constructorInfo = type.GetConstructor(new Type[0]); + //Try to find a default parameterless constructor + ConstructorInfo constructorInfo = type.GetTypeInfo().DeclaredConstructors.FirstOrDefault(c => c.GetParameters().Length == 0); if (constructorInfo == null) { diff --git a/src/FlatMapper/project.json b/src/FlatMapper/project.json index 676b2b5..721c32c 100644 --- a/src/FlatMapper/project.json +++ b/src/FlatMapper/project.json @@ -1,5 +1,5 @@ { - "version": "0.8.0", + "version": "0.9.0", "description": "A library to import and export data from plain text files in a Linq compatible way", "authors": [ "kappy" ], "packOptions": { @@ -8,30 +8,13 @@ "licenseUrl": "http://www.apache.org/licenses/LICENSE-2.0" }, "frameworks": { - "net45": { + "netstandard1.1": { "dependencies": { - } - }, - "net35": { - "dependencies": { - } - }, - "dnx451": { - "dependencies": { - } - }, - "dotnet5.1": { - "dependencies": { - "Microsoft.CSharp": "4.0.0", - "System.Collections": "4.0.10", - "System.Linq": "4.0.0", - "System.Runtime": "4.0.20", - "System.Threading": "4.0.10", - "System.Runtime.Extensions": "4.0.10", - "System.Reflection.TypeExtensions": "4.0.0", - "System.Reflection.Emit.ILGeneration": "4.0.0", - "System.Reflection.Emit.Lightweight": "4.0.0" + "NETStandard.Library": "1.6.0" } } + }, + "dependencies": { + "System.Reflection.Emit.Lightweight": "4.3.0" } }