Skip to content

Commit 8a410ae

Browse files
committed
Adding the missing dependency for offline state
1 parent 8bd4fee commit 8a410ae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/WebJobs.Script/ScriptHostBuilderExtensions.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,15 @@ public static IHostBuilder AddScriptHostCore(this IHostBuilder builder, ScriptAp
103103
.AddTimers()
104104
.AddManualTrigger();
105105

106+
var extensionBundleOptions = GetExtensionBundleOptions(context);
107+
var bundleManager = new ExtensionBundleManager(extensionBundleOptions, SystemEnvironment.Instance, loggerFactory);
106108
if (!skipHostInitialization)
107109
{
108-
var extensionBundleOptions = GetExtensionBundleOptions(context);
109-
var bundleManager = new ExtensionBundleManager(extensionBundleOptions, SystemEnvironment.Instance, loggerFactory);
110-
111110
// Only set our external startup if we're not suppressing host initialization
112111
// as we don't want to load user assemblies otherwise.
113112
webJobsBuilder.UseScriptExternalStartup(applicationHostOptions.ScriptPath, bundleManager);
114-
webJobsBuilder.Services.AddSingleton<IExtensionBundleManager>(_ => bundleManager);
115113
}
114+
webJobsBuilder.Services.AddSingleton<IExtensionBundleManager>(_ => bundleManager);
116115

117116
configureWebJobs?.Invoke(webJobsBuilder);
118117
}, o => o.AllowPartialHostStartup = true);

0 commit comments

Comments
 (0)