Revert the attempt to share signal file path between MSBuild and VS extension code, because it doesn't get populated at the right time
This commit is contained in:
parent
3b0f1313fe
commit
6f7c188a76
|
|
@ -59,16 +59,10 @@
|
||||||
-->
|
-->
|
||||||
<Target Name="_BlazorIssueLiveReloadNotification"
|
<Target Name="_BlazorIssueLiveReloadNotification"
|
||||||
AfterTargets="Build"
|
AfterTargets="Build"
|
||||||
Condition="'$(UseBlazorLiveReloading)'=='true' AND '$(_BlazorDidCopyFilesToOutputDirectory)'=='true'">
|
Condition="'$(UseBlazorLiveReloading)'=='true' AND '$(_BlazorDidCopyFilesToOutputDirectory)'=='true' AND '$(BuildingInsideVisualStudio)'!='true'">
|
||||||
<PropertyGroup>
|
<!-- Touch the signal file to trigger a reload -->
|
||||||
<_BlazorBuildCompletedSignalFullPath>$(ProjectDir)$(OutputPath)$(BlazorBuildCompletedSignalPath)</_BlazorBuildCompletedSignalFullPath>
|
<WriteLinesToFile File="$(ProjectDir)$(OutputPath)$(BlazorBuildCompletedSignalPath)" Lines="_" />
|
||||||
</PropertyGroup>
|
<Delete Files="$(ProjectDir)$(OutputPath)$(BlazorBuildCompletedSignalPath)" />
|
||||||
<!--
|
|
||||||
If this is a command-line build, touch the signal file to trigger a reload.
|
|
||||||
If it's a VS build, then the VS extension will write the signal file instead.
|
|
||||||
-->
|
|
||||||
<WriteLinesToFile Condition="'$(BuildingInsideVisualStudio)'!='true'" File="$(_BlazorBuildCompletedSignalFullPath)" Lines="_" />
|
|
||||||
<Delete Condition="'$(BuildingInsideVisualStudio)'!='true'" Files="$(_BlazorBuildCompletedSignalFullPath)" />
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!-- Preparing blazor files for output:
|
<!-- Preparing blazor files for output:
|
||||||
|
|
|
||||||
|
|
@ -94,10 +94,18 @@ namespace Microsoft.VisualStudio.BlazorExtension
|
||||||
var project = await access.GetProjectAsync(configuredProject);
|
var project = await access.GetProjectAsync(configuredProject);
|
||||||
|
|
||||||
// Now we can evaluate MSBuild properties
|
// Now we can evaluate MSBuild properties
|
||||||
var signalFileFullPath = project.GetPropertyValue("_BlazorBuildCompletedSignalFullPath");
|
var projectDir = project.GetPropertyValue("ProjectDir");
|
||||||
if (!string.IsNullOrEmpty(signalFileFullPath))
|
var outputPath = project.GetPropertyValue("OutputPath");
|
||||||
|
var signalFilePath = project.GetPropertyValue("BlazorBuildCompletedSignalPath");
|
||||||
|
if (!string.IsNullOrEmpty(projectDir)
|
||||||
|
&& !string.IsNullOrEmpty(outputPath)
|
||||||
|
&& !string.IsNullOrEmpty(signalFilePath))
|
||||||
{
|
{
|
||||||
_signalFilePathsToNotify.Add(signalFileFullPath);
|
var fullPath = Path.Combine(
|
||||||
|
projectDir,
|
||||||
|
outputPath,
|
||||||
|
signalFilePath);
|
||||||
|
_signalFilePathsToNotify.Add(fullPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue