Don't prepend root to path when path starts with root

This commit is contained in:
Benjamin Carleski
2020-11-19 03:07:05 -08:00
parent ff8edd3bf9
commit 42f4fdf8c8
3 changed files with 9 additions and 11 deletions

View File

@@ -452,7 +452,7 @@ namespace Umbraco.ModelsBuilder.Embedded
try
{
var assemblyPath = GetOutputAssemblyPath(currentHash);
RoslynCompiler.CompileToFile(_hostingEnvironment.MapPathContentRoot(projFile), assemblyPath);
RoslynCompiler.CompileToFile(projFile, assemblyPath);
assembly = ReloadAssembly(assemblyPath);
File.WriteAllText(dllPathFile, assembly.Location);
File.WriteAllText(modelsHashFile, currentHash);
@@ -494,7 +494,7 @@ namespace Umbraco.ModelsBuilder.Embedded
try
{
var assemblyPath = GetOutputAssemblyPath(currentHash);
RoslynCompiler.CompileToFile(_hostingEnvironment.MapPathContentRoot(projFile), assemblyPath);
RoslynCompiler.CompileToFile(projFile, assemblyPath);
assembly = ReloadAssembly(assemblyPath);
File.WriteAllText(dllPathFile, assemblyPath);
File.WriteAllText(modelsHashFile, currentHash);