public override void Load() { base.Load(); var bundleId = ExtensionBundleHelper.GetExtensionBundleOptions(_hostOptions).Id; if (!string.IsNullOrEmpty(bundleId)) { var packages = ExtensionsHelper.GetExtensionPackages(); if (packages.Count() == 0) { var keysToRemove = Data.Where((keyValue) => keyValue.Key.Contains("extensionBundle")) .Select(keyValue => keyValue.Key) .ToList(); foreach (var key in keysToRemove) { Data.Remove(key); } } else { Data["AzureFunctionsJobHost:extensionBundle:downloadPath"] = Path.Combine(Path.GetTempPath(), "Functions", ScriptConstants.ExtensionBundleDirectory, bundleId); } } }
public void Configure(IConfigurationBuilder builder) { var bundleId = ExtensionBundleHelper.GetExtensionBundleOptions(_hostOptions).Id; if (!string.IsNullOrEmpty(bundleId)) { builder.AddInMemoryCollection(new Dictionary <string, string> { { "AzureFunctionsJobHost:extensionBundle:downloadPath", Path.Combine(Path.GetTempPath(), "Functions", ScriptConstants.ExtensionBundleDirectory, bundleId) } }); } }
public void Configure(IConfigurationBuilder builder) { var bundleId = ExtensionBundleHelper.GetExtensionBundleOptions(_hostOptions).Id; if (!string.IsNullOrEmpty(bundleId)) { builder.AddInMemoryCollection(new Dictionary <string, string> { { "AzureFunctionsJobHost:extensionBundle:downloadPath", ExtensionBundleHelper.GetDownloadPath(bundleId) }, { "AzureFunctionsJobHost:extensionBundle:ensureLatest", "true" } }); } }