summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild.sh13
-rwxr-xr-xdotnet.sh2
-rw-r--r--init-dotnet.sh2
3 files changed, 7 insertions, 10 deletions
diff --git a/build.sh b/build.sh
index 78ee31dc19..f3e0b303d6 100755
--- a/build.sh
+++ b/build.sh
@@ -150,14 +150,11 @@ restore_optdata()
if [ $__isMSBuildOnNETCoreSupported == 1 ]; then
# Parse the optdata package versions out of msbuild so that we can pass them on to CMake
- local DotNetCli="$__ProjectRoot/.dotnet/dotnet"
- if [ ! -f $DotNetCli ]; then
- source "$__ProjectRoot/init-dotnet.sh"
- if [ $? != 0 ]; then
- echo "Failed to install dotnet."
- exit 1
- fi
- fi
+
+ # Init dotnet
+ source "${__ProjectRoot}/init-dotnet.sh"
+ local DotNetCli=${_InitializeDotNetCli}/dotnet
+
__PgoOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /nologo)
if [ $? != 0 ]; then
echo "Failed to get PGO data package version."
diff --git a/dotnet.sh b/dotnet.sh
index 82ca63a5b8..505d9d1dc9 100755
--- a/dotnet.sh
+++ b/dotnet.sh
@@ -11,7 +11,7 @@ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
echo "Running init-dotnet.sh"
source $working_tree_root/init-dotnet.sh
-dotnet=$working_tree_root/.dotnet/dotnet
+dotnet=${_InitializeDotNetCli}/dotnet
echo "Running: $dotnet $@"
$dotnet "$@"
diff --git a/init-dotnet.sh b/init-dotnet.sh
index f7ac32bad7..b446260af5 100644
--- a/init-dotnet.sh
+++ b/init-dotnet.sh
@@ -12,4 +12,4 @@ InitializeBuildTool
if [ $? != 0 ]; then
echo "Failed to install dotnet using Arcade"
exit $?
-fi
+fi \ No newline at end of file