[hotrestart] Ensure we set the correct value for the "IsHotRestartBuild" property by mauroa · Pull Request #19103 · dotnet/macios (original) (raw)

"IsHotRestartBuild" is an MSBuild global property set by the VS extension or manually when running a CLI build, however for multi target frameworks builds it could happen that if the global value has been set to true, it will remain true for all the inner builds and affect other target frameworks that are not compatible with Hot Restart (e.g: MacCatalyst).

This commit adds an extra target "_DetectBuildType", which will set the correct value for "IsHotRestartBuild" and "IsRemoteBuild", so any other target that uses those properties can be sure that the values are the right ones for the current build run.

Fixes Bug #1886158 - [MAUI][.NET8] MAUI/MAUI Blazor project build on local device failed with error 'The "CompileAppManifest" task failed unexpectedly'.: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1886158