Fix update-dependencies.
Don't import the root Directory.Build.props during update-dependencies because it imports generated .props files that don't exist outside of the build.
(cherry picked from commit 0491fd3826
)
This commit is contained in:
parent
57d256dbf5
commit
12931ba320
3 changed files with 12 additions and 13 deletions
8
build_projects/update-dependencies/Directory.Build.props
Normal file
8
build_projects/update-dependencies/Directory.Build.props
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Empty Directory.Build.props so the repo's root Directory.Build.props isn't imported,
|
||||||
|
since it imports generated .props files that aren't necessary for update-dependencies.
|
||||||
|
-->
|
||||||
|
|
||||||
|
</Project>
|
|
@ -34,6 +34,8 @@ if (!$env:DOTNET_INSTALL_DIR)
|
||||||
$env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\$Architecture"
|
$env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\$Architecture"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||||
|
|
||||||
# Install a stage 0
|
# Install a stage 0
|
||||||
Write-Output "Installing .NET Core CLI Stage 0"
|
Write-Output "Installing .NET Core CLI Stage 0"
|
||||||
|
|
||||||
|
@ -50,11 +52,6 @@ else
|
||||||
# Put the stage0 on the path
|
# Put the stage0 on the path
|
||||||
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
|
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"
|
||||||
|
|
||||||
# Restore the app
|
|
||||||
Write-Output "Restoring $ProjectPath..."
|
|
||||||
dotnet restore "$ProjectPath"
|
|
||||||
if($LASTEXITCODE -ne 0) { throw "Failed to restore" }
|
|
||||||
|
|
||||||
# Run the app
|
# Run the app
|
||||||
Write-Output "Invoking App $ProjectPath..."
|
Write-Output "Invoking App $ProjectPath..."
|
||||||
dotnet run -p "$ProjectPath" "$ProjectArgs"
|
dotnet run -p "$ProjectPath" "$ProjectArgs"
|
||||||
|
|
|
@ -30,6 +30,8 @@ if [ -z "${DOTNET_INSTALL_DIR:-}" ]; then
|
||||||
export DOTNET_INSTALL_DIR=$REPO_ROOT/.dotnet_stage0/x64
|
export DOTNET_INSTALL_DIR=$REPO_ROOT/.dotnet_stage0/x64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||||
|
|
||||||
if [ ! -d "$DOTNET_INSTALL_DIR" ]; then
|
if [ ! -d "$DOTNET_INSTALL_DIR" ]; then
|
||||||
mkdir -p $DOTNET_INSTALL_DIR
|
mkdir -p $DOTNET_INSTALL_DIR
|
||||||
fi
|
fi
|
||||||
|
@ -50,14 +52,6 @@ fi
|
||||||
# Put the stage 0 on the path
|
# Put the stage 0 on the path
|
||||||
export PATH=$DOTNET_INSTALL_DIR:$PATH
|
export PATH=$DOTNET_INSTALL_DIR:$PATH
|
||||||
|
|
||||||
echo "Restoring $PROJECT_PATH..."
|
|
||||||
dotnet restore "$PROJECT_PATH"
|
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
echo "Failed to restore"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Invoking App $PROJECT_PATH..."
|
echo "Invoking App $PROJECT_PATH..."
|
||||||
dotnet run -p "$PROJECT_PATH" $@
|
dotnet run -p "$PROJECT_PATH" $@
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue