From 5321f493ec528f86b5e979945eec08050fa9681c Mon Sep 17 00:00:00 2001 From: Nikolaj Date: Mon, 7 Sep 2020 12:37:47 +0200 Subject: [PATCH] Remember to use assemblyPath variable in CompileToFile --- src/Umbraco.ModelsBuilder.Embedded/PureLiveModelFactory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);