Skip to content

Commit f9577cb

Browse files
authored
Fix build on systems where VS 2017 isn't latest on the system (#210)
- no need to get things working where VS 2019 preview is the only build available - start using .NET Core SDK 2.1.403 - confirmed AppVeyor and wsr-tc agents both have this SDK - correct ordering issue with restore of System.Net.Http.Formatting.NetCore project
1 parent e0f1f13 commit f9577cb

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Runtime.msbuild

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,14 @@
6565

6666
<Target Name="RestorePackages" DependsOnTargets="DownloadNuGet">
6767
<Message Text="Restoring NuGet packages..." Importance="High" />
68+
69+
<!-- NuGet.exe attempts to read src\System.Net.Http.Formatting.NetCore\System.Net.Http.Formatting.NetCore.csproj and imports fails without packages. -->
70+
<Exec Command='"$(NuGetExe)" restore "src\System.Net.Http.Formatting.NetCore\packages.config" -PackagesDirectory packages -NonInteractive -Verbosity quiet -ConfigFile "$(MsBuildThisFileDirectory)\.nuget\NuGet.Config"' />
71+
6872
<Exec Command='"$(NuGetExe)" restore "%(SolutionsToBuild.Identity)" -PackagesDirectory packages -NonInteractive -Verbosity quiet -ConfigFile "$(MsBuildThisFileDirectory)\.nuget\NuGet.Config"' />
69-
<!-- Pick the right Microsoft.Web.FxCop package to use and copy it to a standard location. -->
7073
</Target>
7174

75+
<!-- Pick the right Microsoft.Web.FxCop package to use and copy it to a standard location. -->
7276
<Target Name="BuildTools">
7377
<PropertyGroup>
7478
<FxCopProjectLocation>$(MsBuildThisFileDirectory)tools\src\Microsoft.Web.FxCop\</FxCopProjectLocation>

build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if not exist %vswhere% (
2626
)
2727

2828
set InstallDir=
29-
for /f "usebackq tokens=*" %%i in (`%vswhere% -latest -prerelease -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
29+
for /f "usebackq tokens=*" %%i in (`%vswhere% -version ^[15^,16^) -latest -prerelease -products * -requires Microsoft.Component.MSBuild -property installationPath`) do (
3030
set InstallDir=%%i
3131
)
3232
if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "2.0.0"
3+
"version": "2.1.403"
44
}
55
}

0 commit comments

Comments
 (0)