Fixed error when removing TFM props file that doesn't yet exist

This commit is contained in:
Arlo Godfrey 2022-04-05 13:50:28 -05:00
Родитель 2df29a54d6
Коммит f7310f7812
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -15,5 +15,8 @@ if ($newFileContents -eq $fileContents) {
return;
}
Clear-Content -Path .\..\Labs.TargetFrameworks.props;
if (Test-Path '.\..\Labs.TargetFrameworks.props') {
Clear-Content -Path .\..\Labs.TargetFrameworks.props;
}
Add-Content -Force -Path .\..\Labs.TargetFrameworks.props -Value $newFileContents;