Avoid modifying global machine state on Helix (#20315)
This commit is contained in:
parent
c7e03508ce
commit
cc2f5497e8
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
@ -23,14 +23,20 @@ echo "Installing SDK"
|
|||
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %$arch% -Version %$sdkVersion% -InstallDir %DOTNET_ROOT%"
|
||||
echo "Installing Runtime"
|
||||
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -useb 'https://dot.net/v1/dotnet-install.ps1'))) -Architecture %$arch% -Runtime dotnet -Version %$runtimeVersion% -InstallDir %DOTNET_ROOT%"
|
||||
|
||||
REM "Rename default.NuGet.config to NuGet.config if there is not a custom one from the project"
|
||||
if not EXIST ".\NuGet.config" (
|
||||
copy default.NuGet.config NuGet.config
|
||||
)
|
||||
|
||||
echo "Checking for Microsoft.AspNetCore.App"
|
||||
if EXIST ".\Microsoft.AspNetCore.App" (
|
||||
echo "Found Microsoft.AspNetCore.App, copying to %DOTNET_ROOT%\shared\Microsoft.AspNetCore.App\%runtimeVersion%"
|
||||
xcopy /i /y ".\Microsoft.AspNetCore.App" %DOTNET_ROOT%\shared\Microsoft.AspNetCore.App\%runtimeVersion%\
|
||||
|
||||
echo "Adding current directory to nuget sources: %HELIX_WORKITEM_ROOT%"
|
||||
dotnet nuget add source %HELIX_WORKITEM_ROOT%
|
||||
dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json
|
||||
dotnet nuget add source %HELIX_WORKITEM_ROOT% --configfile NuGet.config
|
||||
dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --configfile NuGet.config
|
||||
dotnet nuget list source
|
||||
dotnet tool install dotnet-ef --global --version %$efVersion%
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,12 @@ if [ $? -ne 0 ]; then
|
|||
done
|
||||
fi
|
||||
|
||||
# Rename default.NuGet.config to NuGet.config if there is not a custom one from the project
|
||||
if [ ! -f "NuGet.config" ]
|
||||
then
|
||||
cp default.NuGet.config NuGet.config
|
||||
fi
|
||||
|
||||
# Copy over any local shared fx if found
|
||||
if [ -d "Microsoft.AspNetCore.App" ]
|
||||
then
|
||||
|
|
@ -100,8 +106,8 @@ then
|
|||
cp -r Microsoft.AspNetCore.App $DOTNET_ROOT/shared/Microsoft.AspNetCore.App/$dotnet_runtime_version
|
||||
|
||||
echo "Adding current directory to nuget sources: $DIR"
|
||||
dotnet nuget add source $DIR
|
||||
dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json
|
||||
dotnet nuget add source $DIR --configfile NuGet.config
|
||||
dotnet nuget add source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json --configfile NuGet.config
|
||||
dotnet nuget list source
|
||||
|
||||
dotnet tool install dotnet-ef --global --version $efVersion
|
||||
|
|
|
|||
Loading…
Reference in New Issue