From 3b0f1313fe9e0891b0b44ea394699f3b5ef8f4de Mon Sep 17 00:00:00 2001 From: Guillaume ZAHRA Date: Tue, 3 Apr 2018 18:11:20 +0200 Subject: [PATCH] Resolution for "The path must be absolute" on published projects Trying to replace the internal "." folder with the local assembly path in order to have an absolute path for the PhysicalFileStorage class at startup ("The path must be absolute" error at startup for published projects) May resolve the issue of #376 on dev --- src/Microsoft.AspNetCore.Blazor.Server/BlazorConfig.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Microsoft.AspNetCore.Blazor.Server/BlazorConfig.cs b/src/Microsoft.AspNetCore.Blazor.Server/BlazorConfig.cs index 33570da566..1010b3a9eb 100644 --- a/src/Microsoft.AspNetCore.Blazor.Server/BlazorConfig.cs +++ b/src/Microsoft.AspNetCore.Blazor.Server/BlazorConfig.cs @@ -29,6 +29,11 @@ namespace Microsoft.AspNetCore.Blazor.Server var configLines = File.ReadLines(configFilePath).ToList(); SourceMSBuildPath = configLines[0]; + if (SourceMSBuildPath == ".") + { + SourceMSBuildPath = assemblyPath; + } + var sourceMsBuildDir = Path.GetDirectoryName(SourceMSBuildPath); SourceOutputAssemblyPath = Path.Combine(sourceMsBuildDir, configLines[1]);