Added quotes to paths in build that cause the build to fail when directory has a space in the path #44

This commit is contained in:
Mark Gaze 2018-02-07 14:25:33 +00:00 committed by Steve Sanderson
parent 4a9d75e2b5
commit 5a4bc2e6d6
3 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<BlazorBuildExe>dotnet $(MSBuildThisFileDirectory)../tools/Microsoft.AspNetCore.Blazor.Build.dll</BlazorBuildExe>
<BlazorBuildExe>dotnet &quot;$(MSBuildThisFileDirectory)../tools/Microsoft.AspNetCore.Blazor.Build.dll&quot;</BlazorBuildExe>
</PropertyGroup>
<Import Project="RazorCompilation.targets" />
@ -21,9 +21,9 @@
<PropertyGroup>
<WebRootName>wwwroot</WebRootName>
<WebRootPath>$(ProjectDir)$(WebRootName)</WebRootPath>
<WebRootParam Condition="Exists('$(WebRootPath)')">--webroot $(WebRootPath)</WebRootParam>
<WebRootParam Condition="Exists('$(WebRootPath)')">--webroot &quot;$(WebRootPath)&quot;</WebRootParam>
</PropertyGroup>
<!-- TODO: Find the correct time to run this (right after assemblies were written) -->
<Exec Command="$(BlazorBuildExe) build $(ProjectDir)$(OutDir)$(AssemblyName).dll $(WebRootParam)" />
<Exec Command="$(BlazorBuildExe) build &quot;$(ProjectDir)$(OutDir)$(AssemblyName).dll&quot; $(WebRootParam)" />
</Target>
</Project>

View File

@ -4,8 +4,9 @@
<BlazorComponentsNamespace>$(RootNamespace)</BlazorComponentsNamespace>
<IsDesignTimeBuild Condition="'$(DesignTimeBuild)' == 'true' OR '$(BuildingProject)' != 'true'">true</IsDesignTimeBuild>
<GeneratedFilePath>$(IntermediateOutputPath)BlazorRazorComponents.g.cs</GeneratedFilePath>
<SourceDir>$(ProjectDir.TrimEnd('\'))</SourceDir>
</PropertyGroup>
<Exec Command="$(BlazorBuildExe) buildrazor --source $(ProjectDir) --namespace $(BlazorComponentsNamespace) --output $(GeneratedFilePath)" />
<Exec Command="$(BlazorBuildExe) buildrazor --source &quot;$(SourceDir)&quot; --namespace $(BlazorComponentsNamespace) --output &quot;$(GeneratedFilePath)&quot;" />
<ItemGroup>
<Compile Include="$(GeneratedFilePath)" />
</ItemGroup>

View File

@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<BlazorBuildToolsExe>dotnet $(MSBuildThisFileDirectory)tools\Microsoft.AspNetCore.Blazor.BuildTools.dll</BlazorBuildToolsExe>
<BlazorBuildToolsExe>dotnet &quot;$(MSBuildThisFileDirectory)tools\Microsoft.AspNetCore.Blazor.BuildTools.dll&quot;</BlazorBuildToolsExe>
</PropertyGroup>
<ItemGroup>