Update Core

This commit is contained in:
sunkaixuan 2017-06-23 00:31:53 +08:00
parent ea855271b5
commit fcf85ec3c8
3 changed files with 4 additions and 6 deletions

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.DependencyModel;
namespace SqlSugar namespace SqlSugar
{ {
@ -11,9 +10,7 @@ namespace SqlSugar
{ {
public static Assembly LoadAssembly(string name) public static Assembly LoadAssembly(string name)
{ {
var deps = DependencyContext.Default; return Assembly.Load(new AssemblyName(PubConst.AssemblyName)) ;
var assemblyies = deps.CompileLibraries.Where(it => it.Name == name).ToList();
return assemblyies.Any() ? Assembly.Load(new AssemblyName(assemblyies.First().Name)) : null;
} }
} }
} }

View File

@ -2,7 +2,7 @@
<package > <package >
<metadata> <metadata>
<id>sqlSugarCore</id> <id>sqlSugarCore</id>
<version>4.0.0.1</version> <version>4.0.0.2</version>
<authors>sunkaixuan</authors> <authors>sunkaixuan</authors>
<owners>Landa</owners> <owners>Landa</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl> <licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
@ -20,6 +20,8 @@
<dependency id="System.Collections.NonGeneric" version="4.0.1" /> <dependency id="System.Collections.NonGeneric" version="4.0.1" />
<dependency id="System.Dynamic.Runtime" version="4.0.11" /> <dependency id="System.Dynamic.Runtime" version="4.0.11" />
<dependency id="System.Reflection.Emit.Lightweight" version="4.0.1" /> <dependency id="System.Reflection.Emit.Lightweight" version="4.0.1" />
<dependency id="System.Runtime.Loader" version="4.0.0" />
</group> </group>
</dependencies> </dependencies>
</metadata> </metadata>

View File

@ -2,7 +2,6 @@
"version": "1.0.0-*", "version": "1.0.0-*",
"dependencies": { "dependencies": {
"Microsoft.Extensions.DependencyModel": "1.0.1-beta-003206",
"NETStandard.Library": "1.6.0", "NETStandard.Library": "1.6.0",
"Newtonsoft.Json": "9.0.1", "Newtonsoft.Json": "9.0.1",
"System.Collections.NonGeneric": "4.0.1", "System.Collections.NonGeneric": "4.0.1",