Only trigger live reloading from VS when enabled in MSBuild

This commit is contained in:
Steve Sanderson 2018-04-04 12:31:43 +01:00
parent 6f7c188a76
commit de4d78f454
1 changed files with 3 additions and 1 deletions

View File

@ -94,10 +94,12 @@ namespace Microsoft.VisualStudio.BlazorExtension
var project = await access.GetProjectAsync(configuredProject);
// Now we can evaluate MSBuild properties
var useLiveReloading = project.GetPropertyValue("UseBlazorLiveReloading");
var projectDir = project.GetPropertyValue("ProjectDir");
var outputPath = project.GetPropertyValue("OutputPath");
var signalFilePath = project.GetPropertyValue("BlazorBuildCompletedSignalPath");
if (!string.IsNullOrEmpty(projectDir)
if (string.Equals(useLiveReloading, "true", StringComparison.Ordinal)
&& !string.IsNullOrEmpty(projectDir)
&& !string.IsNullOrEmpty(outputPath)
&& !string.IsNullOrEmpty(signalFilePath))
{