Skip to content

Commit 9b3fdbb

Browse files
committed
Installation: Fixes "No constructor was found that had all the dependencies satisfied."
1 parent 62dd2ef commit 9b3fdbb

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/Libraries/SmartStore.Core/Infrastructure/DependencyManagement/ContainerManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public object ResolveUnregistered(Type type, ILifetimeScope scope = null)
9595
}
9696
}
9797

98-
throw new SmartException("No contructor was found that had all the dependencies satisfied.");
98+
throw new SmartException("No constructor for {0} was found that had all the dependencies satisfied.".FormatInvariant(type.Name.NaIfEmpty()));
9999
}
100100

101101
private bool TryResolveAll(Type[] types, out object[] instances, ILifetimeScope scope = null)

src/Presentation/SmartStore.Web.Framework/DependencyRegistrar.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,11 +1094,12 @@ public DataExchangeModule(ITypeFinder typeFinder)
10941094

10951095
protected override void Load(ContainerBuilder builder)
10961096
{
1097+
builder.RegisterType<ExportProfileService>().As<IExportProfileService>().InstancePerRequest();
1098+
builder.RegisterType<ImportProfileService>().As<IImportProfileService>().InstancePerRequest();
1099+
10971100
if (!DataSettings.DatabaseIsInstalled())
10981101
return;
10991102

1100-
builder.RegisterType<ExportProfileService>().As<IExportProfileService>().InstancePerRequest();
1101-
builder.RegisterType<ImportProfileService>().As<IImportProfileService>().InstancePerRequest();
11021103
builder.RegisterType<DataExporter>().As<IDataExporter>().InstancePerRequest();
11031104
builder.RegisterType<DataImporter>().As<IDataImporter>().InstancePerRequest();
11041105

0 commit comments

Comments
 (0)