Adds correct reference for HostingEnvironment

This commit is contained in:
Elitsa Marinovska
2020-08-03 14:37:32 +02:00
parent 84e330a0ee
commit 6a6e219652

View File

@@ -2,9 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web.Compilation;
using System.Web.Hosting;
using Umbraco.Core;
using Umbraco.Composing;
namespace Umbraco.ModelsBuilder.Embedded
{
@@ -14,7 +12,7 @@ namespace Umbraco.ModelsBuilder.Embedded
static ReferencedAssemblies()
{
LazyLocations = new Lazy<IEnumerable<string>>(() => HostingEnvironment.IsHosted
LazyLocations = new Lazy<IEnumerable<string>>(() => Current.HostingEnvironment.IsHosted // fixme inject!
? GetAllReferencedAssembliesLocationFromBuildManager()
: GetAllReferencedAssembliesFromDomain());
}