Update thunktemplates.S (#100066) (#529)
[platform/upstream/dotnet/runtime.git] / dotnet.cmd
1 @echo off
2
3 powershell -ExecutionPolicy ByPass -NoProfile -Command "& { . '%~dp0eng\common\tools.ps1'; InitializeDotNetCli $true $true }"
4
5 if NOT [%ERRORLEVEL%] == [0] (
6   echo Failed to install or invoke dotnet... 1>&2
7   exit /b %ERRORLEVEL%
8 )
9
10 set /p dotnetPath=<%~dp0artifacts\toolset\sdk.txt
11
12 :: Clear the 'Platform' env variable for this session, as it's a per-project setting within the build, and
13 :: misleading value (such as 'MCD' in HP PCs) may lead to build breakage (issue: #69).
14 set Platform=
15
16 :: Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism
17 set DOTNET_MULTILEVEL_LOOKUP=0
18
19 :: Disable first run since we want to control all package sources
20 set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
21
22 call "%dotnetPath%\dotnet.exe" %*