Skip to content

Commit

Permalink
Fix an issue with dependency resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavien committed Jul 10, 2016
1 parent 68306d2 commit 91d3b8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Openchain.Server/Models/DependencyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static async Task<Func<IServiceProvider, T>> Create(IServiceProvider serv

try
{
DependencyResolver<T> resolver = new DependencyResolver<T>(serviceProvider, Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), rootSection);
DependencyResolver<T> resolver = new DependencyResolver<T>(serviceProvider, new FileInfo(Assembly.GetEntryAssembly().Location).Directory.FullName, rootSection);

if (resolver.builder == null)
serviceProvider.GetRequiredService<ILogger>().LogWarning($"Unable to find a provider for {typeof(T).FullName} from the '{configurationPath}' configuration section.");
Expand Down Expand Up @@ -95,7 +95,7 @@ private static IList<Assembly> LoadAllAssemblies(string projectPath)
.Where(name =>
Path.GetFileName(name).StartsWith("Openchain.", StringComparison.OrdinalIgnoreCase)
&& Path.GetFileNameWithoutExtension(name) != "Openchain.Server"
&& Path.GetFileNameWithoutExtension(name) != "Openchain"
&& !Path.GetFileNameWithoutExtension(name).Equals("Openchain", StringComparison.OrdinalIgnoreCase)
&& Path.GetExtension(name).Equals(".dll", StringComparison.OrdinalIgnoreCase))
.Select(file => AssemblyLoadContext.Default.LoadFromAssemblyPath(Path.Combine(projectPath, file)))
.ToList();
Expand Down
6 changes: 3 additions & 3 deletions src/Openchain/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"type": "platform"
},
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",

"Openchain.Server": "0.6.0",

"Openchain.Anchoring.Blockchain": "0.6.0",
"Openchain.Sqlite": "0.6.0",
"Openchain.Validation.PermissionBased": "0.6.0",
"Openchain.Anchoring.Blockchain": "0.6.0"
"Openchain.SqlServer": "0.6.0",
"Openchain.Validation.PermissionBased": "0.6.0"
},

"frameworks": {
Expand Down

0 comments on commit 91d3b8e

Please sign in to comment.