Skip to content

Commit

Permalink
Restore solution when using vs switch (dotnet#38024)
Browse files Browse the repository at this point in the history
* Restore solution when using vs switch

Restore the solution up-front when using the vs switch until NuGet/Home#5154 is fixed.
  • Loading branch information
ViktorHofer authored Jun 17, 2020
1 parent 36bf0e9 commit 2cec04a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ if ($vs) {
}

# This tells .NET Core to use the bootstrapped runtime
$env:DOTNET_ROOT=InitializeDotNetCli -install:$false
$env:DOTNET_ROOT=InitializeDotNetCli -install:$true -createSdkLocationFile:$true

# This tells MSBuild to load the SDK from the directory of the bootstrapped SDK
$env:DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR=$env:DOTNET_ROOT
Expand All @@ -148,6 +148,9 @@ if ($vs) {
# Respect the RuntimeConfiguration variable for building inside VS with different runtime configurations
$env:RUNTIMECONFIGURATION=$runtimeConfiguration
}

# Restore the solution to workaround https://github.com/dotnet/runtime/issues/32205
Invoke-Expression "& dotnet restore $vs"

# Launch Visual Studio with the locally defined environment variables
."$vs"
Expand Down

0 comments on commit 2cec04a

Please sign in to comment.