Remember to use assemblyPath variable in CompileToFile

This commit is contained in:
Nikolaj
2020-09-07 12:37:47 +02:00
parent 5d12f99eaf
commit 5321f493ec

View File

@@ -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);