diff --git a/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs b/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs index 32fde77f43..a82e18466b 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs +++ b/src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs @@ -399,7 +399,7 @@ namespace Umbraco.ModelsBuilder.Embedded try { var assemblyPath = GetOutputAssemblyPath(currentHash); - RoslynCompiler.CompileToFile(_hostingEnvironment.MapPathContentRoot(projFile), GetOutputAssemblyPath(currentHash)); + RoslynCompiler.CompileToFile(_hostingEnvironment.MapPathContentRoot(projFile), assemblyPath); assembly = ReloadAssembly(assemblyPath); File.WriteAllText(dllPathFile, assembly.Location); TryDeleteUnusedAssemblies(dllPathFile); @@ -440,7 +440,7 @@ namespace Umbraco.ModelsBuilder.Embedded try { var assemblyPath = GetOutputAssemblyPath(currentHash); - RoslynCompiler.CompileToFile(_hostingEnvironment.MapPathContentRoot(projFile), GetOutputAssemblyPath(currentHash)); + RoslynCompiler.CompileToFile(_hostingEnvironment.MapPathContentRoot(projFile), assemblyPath); assembly = ReloadAssembly(assemblyPath); File.WriteAllText(dllPathFile, assemblyPath); File.WriteAllText(modelsHashFile, currentHash);