Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ extends:
enabled: true
pool:
name: NetCore1ESPool-Svc-Internal
image: 1es-windows-2019
demands:
- ImageOverride -equals windows.vs2019.amd64
- ImageVersionOverride -equals 2026.0304.014948
os: windows
stages:
- stage: build
Expand Down
32 changes: 29 additions & 3 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ if not DEFINED InstallDir (
goto BuildFail
)

REM Find a 64bit MSBuild and add it to path. Require v17.4 or later due to our .NET SDK choice.
REM Find a 64bit MSBuild and add it to path. Require v17.8.3 or later due to our .NET SDK choice.
REM Check for VS2022 first.
set InstallDir=
for /f "usebackq tokens=*" %%i in (`%vswhere% -version 17.4 -latest -prerelease -products * ^
for /f "usebackq tokens=*" %%i in (`%vswhere% -version 17.8.3 -latest -prerelease -products * ^
-requires Microsoft.Component.MSBuild ^
-property installationPath`) do (
set "InstallDir=%%i"
Expand All @@ -52,10 +52,36 @@ if DEFINED InstallDir (
goto FoundMSBuild
)

REM VS2022 with MSBuild v17.8.3+ not found. Check for standalone MSBuild SDK.
set "StandaloneSdkBase=C:\msbuild-standalone\sdk"
set "StandaloneMSBuildDir="
echo "Looking in msbuild-standalone dir"
if exist "%StandaloneSdkBase%" (
for /f "delims=" %%d in ('dir /b /ad /o-n "%StandaloneSdkBase%"') do (
echo "Looking in %StandaloneSdkBase%\%%d\MSBuild.dll"
if exist "%StandaloneSdkBase%\%%d\MSBuild.dll" (
set "StandaloneMSBuildDir=%StandaloneSdkBase%\%%d"
goto CheckStandaloneVersion
)
)
)
goto SkipStandalone

:CheckStandaloneVersion
echo "Checking standalone version"
for /f "usebackq tokens=*" %%v in (`dotnet exec "%StandaloneMSBuildDir%\MSBuild.dll" -nologo -version`) do set "MSBuildVer=%%v"
PowerShell -NoProfile -NoLogo -Command "if ([version]'%MSBuildVer%' -ge [version]'17.8.3') { exit 0 } else { exit 1 }"
if not errorlevel 1 (
set "PATH=%StandaloneMSBuildDir%;%PATH%"
goto FoundMSBuild
)

:SkipStandalone

REM Otherwise find or install an xcopy-able MSBuild.
echo "Could not find a VS2022 installation with the necessary components (MSBuild). Falling back..."

set "MSBuildVersion=17.4.1"
set "MSBuildVersion=17.8.5"
set "Command=[System.Threading.Thread]::CurrentThread.CurrentCulture = ''"
set "Command=%Command%; [System.Threading.Thread]::CurrentThread.CurrentUICulture = ''"
set "Command=%Command%; try { & '%~dp0eng\GetXCopyMSBuild.ps1' %MSBuildVersion%; exit $LASTEXITCODE }"
Expand Down
4 changes: 3 additions & 1 deletion eng/templates/default-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ jobs:
${{ if eq(variables['System.TeamProject'], 'public') }}:
pool:
name: NetCore-Svc-Public
demands: ImageOverride -equals windows.vs2019.amd64.open
demands:
- ImageOverride -equals windows.vs2019.amd64.open
- ImageVersionOverride -equals 2026.0304.014948
timeoutInMinutes: 30

strategy:
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.405",
"version": "8.0.413",
"rollForward": "major"
}
}
2 changes: 1 addition & 1 deletion test/Microsoft.TestCommon/Microsoft.TestCommon.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),Runtime.sln))\tools\WebStack.settings.targets" />
<PropertyGroup>
<TargetFrameworks>net462;netcoreapp2.1;net6.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp2.1;net8.0</TargetFrameworks>
<Configurations>$(Configurations);CodeAnalysis</Configurations>
<DefineConstants
Condition=" '$(Testing_NetStandard1_3)' == 'true' ">$(DefineConstants);Testing_NetStandard1_3</DefineConstants>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ public void Ctor_ThrowsOnNullMediaTypeString()
range: range,
mediaType: (String)null,
bufferSize: 128),
"mediaType");
"mediaType",
allowDerivedExceptions: true);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),Runtime.sln))\tools\WebStack.settings.targets" />
<PropertyGroup>
<TargetFrameworks>net462;netcoreapp2.1;net6.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp2.1;net8.0</TargetFrameworks>
<RootNamespace>System.Net.Http</RootNamespace>
<OutputPath>..\..\bin\$(Configuration)\Test\ns1_3\</OutputPath>
<Configurations>$(Configurations);CodeAnalysis</Configurations>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),Runtime.sln))\tools\WebStack.settings.targets" />
<PropertyGroup>
<TargetFrameworks>net462;netcoreapp2.1;net6.0</TargetFrameworks>
<TargetFrameworks>net462;netcoreapp2.1;net8.0</TargetFrameworks>
<RootNamespace>System.Net.Http</RootNamespace>
<OutputPath>..\..\bin\$(Configuration)\Test\ns2_0\</OutputPath>
<Configurations>$(Configurations);CodeAnalysis</Configurations>
Expand Down
Loading