зеркало из https://github.com/microsoft/vstest.git
Use latest dotnet sdk for builds. (#1063)
* Use latest dotnet sdk for builds. * PR comments: modify build.sh. * Remove explicit reference to preview 2.0 target framework * Remove explicit version in testassets.props * Remove explicit target framework in outofproc datacollector * Install 2.0.0 shared runtime.
This commit is contained in:
Родитель
2097974224
Коммит
8fade23755
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageRestore>
|
||||
<add key="enabled" value="True" />
|
||||
</packageRestore>
|
||||
<packageSources>
|
||||
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
|
||||
<clear />
|
||||
|
@ -7,9 +10,6 @@
|
|||
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="vstest" value="https://dotnet.myget.org/F/vstest/api/v3/index.json" />
|
||||
</packageSources>
|
||||
<activePackageSource>
|
||||
<add key="All" value="(Aggregate source)" />
|
||||
</activePackageSource>
|
||||
<fallbackPackageFolders>
|
||||
<clear />
|
||||
</fallbackPackageFolders>
|
||||
|
|
|
@ -61,8 +61,8 @@ $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
|
|||
# Dotnet build doesn't support --packages yet. See https://github.com/dotnet/cli/issues/2712
|
||||
$env:NUGET_PACKAGES = $env:TP_PACKAGES_DIR
|
||||
$env:NUGET_EXE_Version = "3.4.3"
|
||||
$env:DOTNET_CLI_VERSION = "2.1.0-preview1-006329"
|
||||
$env:DOTNET_RUNTIME_VERSION = "2.0.0-preview2-25331-01"
|
||||
$env:DOTNET_CLI_VERSION = "LATEST"
|
||||
$env:DOTNET_RUNTIME_VERSION = "LATEST"
|
||||
$env:VSWHERE_VERSION = "2.0.2"
|
||||
$env:MSBUILD_VERSION = "15.0"
|
||||
|
||||
|
@ -146,10 +146,15 @@ function Install-DotNetCli
|
|||
& $dotnetInstallScript -InstallDir $dotnetInstallPath -SharedRuntime -Version '1.1.2' -Channel 'release/1.1.0'
|
||||
}
|
||||
|
||||
# Get shared components which is compatible with dotnet cli version $env:DOTNET_CLI_VERSION
|
||||
if (!(Test-Path "$dotnetInstallPath\shared\Microsoft.NETCore.App\$env:DOTNET_RUNTIME_VERSION")) {
|
||||
& $dotnetInstallScript -InstallDir $dotnetInstallPath -SharedRuntime -Version $env:DOTNET_RUNTIME_VERSION -Channel 'master'
|
||||
# Get netcoreapp2.0 shared components.
|
||||
if (!(Test-Path "$dotnetInstallPath\shared\Microsoft.NETCore.App\2.0.0")) {
|
||||
& $dotnetInstallScript -InstallDir $dotnetInstallPath -SharedRuntime -Version '2.0.0' -Channel 'release/2.0.0'
|
||||
}
|
||||
|
||||
# Get shared components which is compatible with dotnet cli version $env:DOTNET_CLI_VERSION
|
||||
#if (!(Test-Path "$dotnetInstallPath\shared\Microsoft.NETCore.App\$env:DOTNET_RUNTIME_VERSION")) {
|
||||
#& $dotnetInstallScript -InstallDir $dotnetInstallPath -SharedRuntime -Version $env:DOTNET_RUNTIME_VERSION -Channel 'master'
|
||||
#}
|
||||
|
||||
Write-Log "Install-DotNetCli: Complete. {$(Get-ElapsedTime($timer))}"
|
||||
}
|
||||
|
@ -160,8 +165,6 @@ function Restore-Package
|
|||
Write-Log "Restore-Package: Start restoring packages to $env:TP_PACKAGES_DIR."
|
||||
$dotnetExe = Get-DotNetPath
|
||||
|
||||
Write-Log ".. .. Restore-Package: Source: $TPB_Solution"
|
||||
& $dotnetExe restore $TPB_Solution --packages $env:TP_PACKAGES_DIR -v:minimal -warnaserror -p:Version=$TPB_Version
|
||||
Write-Log ".. .. Restore-Package: Source: $env:TP_ROOT_DIR\src\package\external\external.csproj"
|
||||
& $dotnetExe restore $env:TP_ROOT_DIR\src\package\external\external.csproj --packages $env:TP_PACKAGES_DIR -v:minimal -warnaserror -p:Version=$TPB_Version
|
||||
Write-Log ".. .. Restore-Package: Complete."
|
||||
|
@ -275,7 +278,7 @@ function Publish-Package
|
|||
New-Item -ItemType directory -Path $fullCLRExtensionsDir -Force | Out-Null
|
||||
New-Item -ItemType directory -Path $coreCLRExtensionsDir -Force | Out-Null
|
||||
|
||||
# Note Note: If there are some dependencies for the logger assemblies, those need to be moved too.
|
||||
# If there are some dependencies for the logger assemblies, those need to be moved too.
|
||||
# Ideally we should just be publishing the loggers to the Extensions folder.
|
||||
$loggers = @("Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger.dll", "Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger.pdb")
|
||||
foreach($file in $loggers) {
|
||||
|
@ -296,7 +299,7 @@ function Publish-Package
|
|||
Copy-Item $blameDataCollectorNetStandard\Microsoft.TestPlatform.Extensions.BlameDataCollector.dll $coreCLRExtensionsDir -Force
|
||||
Copy-Item $blameDataCollectorNetStandard\Microsoft.TestPlatform.Extensions.BlameDataCollector.pdb $coreCLRExtensionsDir -Force
|
||||
|
||||
# Copy Event Log Datacollector to Extensions folder.
|
||||
# Copy Event Log Datacollector to Extensions folder.
|
||||
$eventLogDataCollector = Join-Path $env:TP_ROOT_DIR "src\DataCollectors\Microsoft.TestPlatform.Extensions.EventLogCollector\bin\$TPB_Configuration"
|
||||
$eventLogDataCollectorNetFull = Join-Path $eventLogDataCollector $TPB_TargetFramework
|
||||
Copy-Item $eventLogDataCollectorNetFull\Microsoft.TestPlatform.Extensions.EventLogCollector.dll $fullCLRExtensionsDir -Force
|
||||
|
@ -304,7 +307,7 @@ function Publish-Package
|
|||
Copy-Item $eventLogDataCollectorNetFull\Microsoft.TestPlatform.Extensions.EventLogCollector.dll $coreCLRExtensionsDir -Force
|
||||
Copy-Item $eventLogDataCollectorNetFull\Microsoft.TestPlatform.Extensions.EventLogCollector.pdb $coreCLRExtensionsDir -Force
|
||||
|
||||
# Note Note: If there are some dependencies for the TestHostRuntimeProvider assemblies, those need to be moved too.
|
||||
# If there are some dependencies for the TestHostRuntimeProvider assemblies, those need to be moved too.
|
||||
$runtimeproviders = @("Microsoft.TestPlatform.TestHostRuntimeProvider.dll", "Microsoft.TestPlatform.TestHostRuntimeProvider.pdb")
|
||||
foreach($file in $runtimeproviders) {
|
||||
Write-Verbose "Move-Item $fullCLRPackageDir\$file $fullCLRExtensionsDir -Force"
|
||||
|
|
|
@ -80,8 +80,8 @@ TP_SRC_DIR="$TP_ROOT_DIR/src"
|
|||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
|
||||
# Dotnet build doesnt support --packages yet. See https://github.com/dotnet/cli/issues/2712
|
||||
export NUGET_PACKAGES=$TP_PACKAGES_DIR
|
||||
DOTNET_CLI_VERSION="2.1.0-preview1-006329"
|
||||
DOTNET_RUNTIME_VERSION="2.0.0-preview2-25331-01"
|
||||
DOTNET_CLI_VERSION="LATEST"
|
||||
DOTNET_RUNTIME_VERSION="LATEST"
|
||||
|
||||
#
|
||||
# Build configuration
|
||||
|
@ -161,8 +161,10 @@ function install_cli()
|
|||
$install_script --install-dir "$TP_TOOLS_DIR/dotnet" --no-path --channel "preview" --version "1.0.5" --shared-runtime
|
||||
log "install_cli: Get the shared netcoreapp1.1 runtime..."
|
||||
$install_script --install-dir "$TP_TOOLS_DIR/dotnet" --no-path --channel "release/1.1.0" --version "1.1.2" --shared-runtime
|
||||
log "install_cli: Get shared components which is compatible with dotnet cli version $DOTNET_CLI_VERSION..."
|
||||
$install_script --install-dir "$TP_TOOLS_DIR/dotnet" --no-path --channel "master" --version $DOTNET_RUNTIME_VERSION --shared-runtime
|
||||
log "install_cli: Get the shared netcoreapp2.0 runtime..."
|
||||
$install_script --install-dir "$TP_TOOLS_DIR/dotnet" --no-path --channel "release/2.0.0" --version "2.0.0" --shared-runtime
|
||||
#log "install_cli: Get shared components which is compatible with dotnet cli version $DOTNET_CLI_VERSION..."
|
||||
#$install_script --install-dir "$TP_TOOLS_DIR/dotnet" --no-path --channel "master" --version $DOTNET_RUNTIME_VERSION --shared-runtime
|
||||
|
||||
log "install_cli: Complete. Elapsed $(( SECONDS - start ))s."
|
||||
return 0
|
||||
|
@ -177,13 +179,6 @@ function restore_package()
|
|||
log "restore_package: Start restoring packages to $TP_PACKAGES_DIR."
|
||||
local start=$SECONDS
|
||||
|
||||
log ".. .. Restore: Source: $TPB_Solution"
|
||||
$dotnet restore $TPB_Solution --packages $TP_PACKAGES_DIR -v:minimal -warnaserror -p:Version=$TPB_Version || failed=true
|
||||
if [ "$failed" = true ]; then
|
||||
error "Failed to restore packages."
|
||||
return 1
|
||||
fi
|
||||
|
||||
log ".. .. Restore: Source: $TP_ROOT_DIR/src/package/external/external.csproj"
|
||||
$dotnet restore $TP_ROOT_DIR/src/package/external/external.csproj --packages $TP_PACKAGES_DIR -v:minimal -warnaserror -p:Version=$TPB_Version || failed=true
|
||||
if [ "$failed" = true ]; then
|
||||
|
|
|
@ -4,8 +4,4 @@
|
|||
<!-- Not able to add TargetFrameworks here due to: https://github.com/dotnet/sdk/issues/1110 -->
|
||||
<NetCoreAppTargetFrameWork Condition="'$(TargetFramework)' != '' AND $(TargetFramework.StartsWith('netcoreapp'))">true</NetCoreAppTargetFrameWork>
|
||||
</PropertyGroup>
|
||||
<!-- TODO Remove when implicit references are available for netcoreapp2.0 -->
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
|
||||
<RuntimeFrameworkVersion>2.0.0-beta-001737-00</RuntimeFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
<TestPlatformRoot Condition="$(TestPlatformRoot) == ''">$(MSBuildThisFileDirectory)..\..\</TestPlatformRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- TODO Remove when implicit references are available for netcoreapp2.0 -->
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
|
||||
<RuntimeFrameworkVersion>2.0.0-beta-001737-00</RuntimeFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Static analysis dependencies -->
|
||||
<ItemGroup Condition="$(EnableCodeAnalysis) == 'true'">
|
||||
<PackageReference Include="StyleCop.Analyzers">
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
<Version>15.0.0.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- TODO Remove when implicit references are available for netcoreapp2.0 -->
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
|
||||
<RuntimeFrameworkVersion>2.0.0-beta-001737-00</RuntimeFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.TestPlatform.ObjectModel\Microsoft.TestPlatform.ObjectModel.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
Загрузка…
Ссылка в новой задаче