[Pp]ackages/
x64/
.dotnet/
+.dotnet-test/
.packages/
.tools/
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.0</TargetFramework>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)\InstallRuntimes.proj" />
<!-- All Rights Reserved. Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.0</TargetFramework>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<Target Name="GenerateVersionFiles" DependsOnTargets="GenerateVersionHeader;GenerateVersionSourceFile" />
From Versions.props:
+ $(MicrosoftDotnetSdkInternalVersion) - .NET SDK to use for testing
+
$(MicrosoftNETCoreAppVersion) $(MicrosoftAspNetCoreAppRefVersion) - latest dotnet runtime/aspnetcore version to install/test
$(MicrosoftNETCoreApp31Version) $(MicrosoftAspNetCoreApp31Version) - 3.1 version
$(MicrosoftNETCoreApp21Version) $(MicrosoftAspNetCoreApp21Version) - 2.1 version
From Arcade:
- $(DotNetRoot) - the SDK/runtime installation root
+ $(RepoRoot) - the root of the diagnostics repo
$(RepositoryEngineeringDir) - the "eng" directory
$(VersionsPropsPath) - path of Versions.props
-->
</PropertyGroup>
<PropertyGroup Condition="'$(BuildArch)' != 'x86'">
- <DotNetInstallRoot>$(DotNetRoot)</DotNetInstallRoot>
+ <DotNetInstallRoot>$(RepoRoot).dotnet-test\</DotNetInstallRoot>
<RegistryRoot>HKEY_LOCAL_MACHINE\SOFTWARE</RegistryRoot>
</PropertyGroup>
<PropertyGroup Condition="'$(BuildArch)' == 'x86'">
- <DotNetInstallRoot>$(DotNetRoot)x86\</DotNetInstallRoot>
+ <DotNetInstallRoot>$(RepoRoot).dotnet-test\x86\</DotNetInstallRoot>
<RegistryRoot>HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node</RegistryRoot>
</PropertyGroup>
<PropertyGroup>
- <CommonInstallArgs>-architecture $(BuildArch)</CommonInstallArgs>
+ <CommonInstallArgs>-NoPath -SkipNonVersionedFiles -Architecture $(BuildArch) -InstallDir $(DotNetInstallRoot)</CommonInstallArgs>
<DotNetInstallDir>$(DotNetInstallRoot.Replace("\", "\\"))shared\\Microsoft.NETCore.App\\$(MicrosoftNETCoreAppVersion)\\</DotNetInstallDir>
<TestConfigFileName>$(DotNetInstallRoot)Debugger.Tests.Versions.txt</TestConfigFileName>
<AddRegeditFileName>$(DotNetInstallRoot)AddPrivateTesting.reg</AddRegeditFileName>
<When Condition="$([MSBuild]::IsOsPlatform(Windows))">
<PropertyGroup>
<PowershellWrapper>powershell -NonInteractive -ExecutionPolicy ByPass -NoProfile -command</PowershellWrapper>
- <DotnetInstallScriptCmd>'$(RepositoryEngineeringDir)common\dotnet-install.ps1'</DotnetInstallScriptCmd>
+ <DotnetInstallScriptCmd>'$(RepositoryEngineeringDir)\dotnet-install.ps1'</DotnetInstallScriptCmd>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
- <DotnetInstallScriptCmd>$(RepositoryEngineeringDir)common/dotnet-install.sh</DotnetInstallScriptCmd>
+ <DotnetInstallScriptCmd>$(RepositoryEngineeringDir)/dotnet-install.sh</DotnetInstallScriptCmd>
</PropertyGroup>
</Otherwise>
</Choose>
Condition="$([MSBuild]::IsOsPlatform(Windows))"
Inputs="$(VersionsPropsPath)" Outputs="$(TestConfigFileName)">
- <Exec Command="$(PowershellWrapper) "& { &$(DotnetInstallScriptCmd) $(CommonInstallArgs) %(TestVersions.ExtraInstallArgs) -version %(TestVersions.RuntimeVersion) -runtime dotnet }""
+ <Exec Command="$(PowershellWrapper) "& { &$(DotnetInstallScriptCmd) $(CommonInstallArgs) -Version $(MicrosoftDotnetSdkInternalVersion) }"" />
+
+ <Exec Command="$(PowershellWrapper) "& { &$(DotnetInstallScriptCmd) $(CommonInstallArgs) %(TestVersions.ExtraInstallArgs) -Version %(TestVersions.RuntimeVersion) -Runtime dotnet }""
Condition="'%(TestVersions.RuntimeVersion)' != ''" />
- <Exec Command="$(PowershellWrapper) "& { &$(DotnetInstallScriptCmd) $(CommonInstallArgs) %(TestVersions.ExtraInstallArgs) -version %(TestVersions.AspNetVersion) -runtime aspnetcore }""
+ <Exec Command="$(PowershellWrapper) "& { &$(DotnetInstallScriptCmd) $(CommonInstallArgs) %(TestVersions.ExtraInstallArgs) -Version %(TestVersions.AspNetVersion) -Runtime aspnetcore }""
Condition="'%(TestVersions.AspNetVersion)' != ''" />
</Target>
Condition="!$([MSBuild]::IsOsPlatform(Windows))"
Inputs="$(VersionsPropsPath)" Outputs="$(TestConfigFileName)">
- <Exec Command="$(DotnetInstallScriptCmd) $(CommonInstallArgs) %(TestVersions.ExtraInstallArgs) -version %(TestVersions.RuntimeVersion) -runtime dotnet"
+ <Exec Command="bash $(DotnetInstallScriptCmd) $(CommonInstallArgs) -Version $(MicrosoftDotnetSdkInternalVersion)"
+ IgnoreStandardErrorWarningFormat="true" />
+
+ <Exec Command="bash $(DotnetInstallScriptCmd) $(CommonInstallArgs) %(TestVersions.ExtraInstallArgs) -Version %(TestVersions.RuntimeVersion) -Runtime dotnet"
IgnoreStandardErrorWarningFormat="true"
Condition="'%(TestVersions.RuntimeVersion)' != ''" />
- <Exec Command="$(DotnetInstallScriptCmd) $(CommonInstallArgs) %(TestVersions.ExtraInstallArgs) -version %(TestVersions.AspNetVersion) -runtime aspnetcore"
+ <Exec Command="bash $(DotnetInstallScriptCmd) $(CommonInstallArgs) %(TestVersions.ExtraInstallArgs) -Version %(TestVersions.AspNetVersion) -Runtime aspnetcore"
IgnoreStandardErrorWarningFormat="true"
Condition="'%(TestVersions.AspNetVersion)' != ''" />
</Target>
--- /dev/null
+[CmdletBinding(PositionalBinding=$false)]
+Param(
+ [string] $InstallDir="<auto>",
+ [string] $Architecture="<auto>",
+ [string] $Version = "Latest",
+ [string] $Runtime,
+ [string] $RuntimeSourceFeed = "",
+ [string] $RuntimeSourceFeedKey = "",
+ [switch] $SkipNonVersionedFiles,
+ [switch] $NoPath
+)
+
+. $PSScriptRoot\common\tools.ps1
+
+try {
+ if ($Runtime) {
+ InstallDotNet $InstallDir $Version $Architecture $Runtime $SkipNonVersionedFiles -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
+ }
+ else {
+ InstallDotNetSdk $InstallDir $Version $Architecture
+ }
+}
+catch {
+ Write-Host $_.ScriptStackTrace
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
+ ExitWithExitCode 1
+}
+
+ExitWithExitCode 0
--- /dev/null
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+# resolve $source until the file is no longer a symlink
+while [[ -h "$source" ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+
+. "$scriptroot/common/tools.sh"
+
+install_dir="<auto>"
+architecture="<auto>"
+version="Latest"
+runtime=""
+runtimeSourceFeed=""
+runtimeSourceFeedKey=""
+skip_non_versioned_files=false
+
+while [[ $# > 0 ]]; do
+ opt="$(echo "$1" | awk '{print tolower($0)}')"
+ case "$opt" in
+ -i|--install-dir|-[Ii]nstall[Dd]ir)
+ shift
+ install_dir="$1"
+ ;;
+ -v|--version|-[Vv]ersion)
+ shift
+ version="$1"
+ ;;
+ --arch|--architecture|-[Aa]rch|-[Aa]rchitecture)
+ shift
+ architecture="$1"
+ ;;
+ --runtime|-[Rr]untime)
+ shift
+ runtime="$1"
+ ;;
+ -runtimesourcefeed)
+ shift
+ runtimeSourceFeed="$1"
+ ;;
+ -runtimesourcefeedkey)
+ shift
+ runtimeSourceFeedKey="$1"
+ ;;
+ --skip-non-versioned-files|-[Ss]kip[Nn]on[Vv]ersioned[Ff]iles)
+ skip_non_versioned_files=true
+ ;;
+ --no-path|-[Nn]o[Pp]ath)
+ ;;
+ *)
+ Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1"
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+if [[ "$runtime" != "" ]]; then
+ InstallDotNet "$install_dir" "$version" "$architecture" $runtime $skip_non_versioned_files $runtimeSourceFeed $runtimeSourceFeedKey
+else
+ InstallDotNetSdk "$install_dir" "$version" "$architecture"
+fi
+
+if [[ $exit_code != 0 ]]; then
+ Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
+ ExitWithExitCode $exit_code
+fi
+
+ExitWithExitCode 0
{
"tools": {
- "dotnet": "5.0.100-preview.6.20310.4",
+ "dotnet": "5.0.100-rc.1.20452.10",
"runtimes": {
"dotnet/x64": [
"$(MicrosoftNETCoreApp31Version)",
{
args += extraArgs;
}
+ output.WriteLine("Launching {0} {1}", DotNetToolPath, args);
ProcessRunner runner = new ProcessRunner(DotNetToolPath, args).
WithWorkingDirectory(DebuggeeSolutionDirPath).
WithLog(output).
AssertDebuggeeProjectFileExists(output);
AssertDebuggeeAssetsFileExists(output);
+ output.WriteLine("Launching {0} {1}", DotNetToolPath, dotnetArgs);
ProcessRunner runner = new ProcessRunner(DotNetToolPath, dotnetArgs).
WithWorkingDirectory(DebuggeeProjectDirPath).
WithLog(output).
get
{
return OS.Kind == OSKind.Linux && IsNETCore && RuntimeFrameworkVersionMajor >= 2 ||
+ OS.Kind == OSKind.OSX && IsNETCore && RuntimeFrameworkVersionMajor >= 5 ||
OS.Kind == OSKind.Windows && IsNETCore && RuntimeFrameworkVersionMajor >= 5;
}
}
<Configuration>
<RepoRootDir>../../../../..</RepoRootDir>
- <DotNetRoot>$(RepoRootDir)/.dotnet</DotNetRoot>
+ <DotNetRoot>$(RepoRootDir)/.dotnet-test</DotNetRoot>
<Import ConfigFile="Debugger.Tests.Common.txt" />
<Import ConfigFile="$(DotNetRoot)/Debugger.Tests.Versions.txt" />
<TestWebApp3 Condition="'$(InternalReleaseTesting)' == 'true'">false</TestWebApp3>
<!-- Build the debuggee for this framework version but run it on latest -->
- <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '5')">netcoreapp3.1</BuildProjectFrameworkLatest>
+ <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '6')">net5.0</BuildProjectFrameworkLatest>
+ <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '5')">net5.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '3.1')">netcoreapp3.1</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '2.1')">netcoreapp2.1</BuildProjectFrameworkLatest>
<Options>
<Option Condition="$(OS) == Linux">
<SOSPath>$(InstallDir)/libsosplugin.so</SOSPath>
- <DotNetDumpHost>$(DotNetRoot)/dotnet</DotNetDumpHost>
- <DotNetDumpPath>$(RootBinDir)/bin/dotnet-dump/$(TargetConfiguration)/netcoreapp2.1/publish/dotnet-dump.dll</DotNetDumpPath>
- <DebuggeeDumpOutputRootDir>$(DumpDir)/$(TestProduct)/$(RuntimeFrameworkVersion)/$(BuildProjectFramework)</DebuggeeDumpOutputRootDir>
- <DebuggeeDumpInputRootDir>$(DebuggeeDumpOutputRootDir)</DebuggeeDumpInputRootDir>
</Option>
<Option Condition="$(OS) == OSX">
<SOSPath>$(InstallDir)/libsosplugin.dylib</SOSPath>
- <!-- Dump testing is disabled on macOS. gdb can't run processes because it needs to be code signed and lldb on macOS's "process save-core" is too slow -->
</Option>
</Options>
+ <DotNetDumpHost>$(DotNetRoot)/dotnet</DotNetDumpHost>
+ <DotNetDumpPath>$(RootBinDir)/bin/dotnet-dump/$(TargetConfiguration)/netcoreapp2.1/publish/dotnet-dump.dll</DotNetDumpPath>
+ <DebuggeeDumpOutputRootDir>$(DumpDir)/$(TestProduct)/$(RuntimeFrameworkVersion)/$(BuildProjectFramework)</DebuggeeDumpOutputRootDir>
+ <DebuggeeDumpInputRootDir>$(DebuggeeDumpOutputRootDir)</DebuggeeDumpInputRootDir>
+
</Configuration>
<Configuration>
<RepoRootDir>..\..\..\..\..</RepoRootDir>
- <DotNetRoot Condition="'$(TargetArchitecture)' != 'x86'">$(RepoRootDir)\.dotnet</DotNetRoot>
- <DotNetRoot Condition="'$(TargetArchitecture)' == 'x86'">$(RepoRootDir)\.dotnet\x86</DotNetRoot>
+ <DotNetRoot Condition="'$(TargetArchitecture)' != 'x86'">$(RepoRootDir)\.dotnet-test</DotNetRoot>
+ <DotNetRoot Condition="'$(TargetArchitecture)' == 'x86'">$(RepoRootDir)\.dotnet-test\x86</DotNetRoot>
<Import ConfigFile="Debugger.Tests.Common.txt" />
<Import ConfigFile="$(DotNetRoot)\Debugger.Tests.Versions.txt" />
<InstallDir>$(RootBinDir)\bin\Windows_NT.$(TargetArchitecture).$(TargetConfiguration)</InstallDir>
<LogDir>$(RootBinDir)\TestResults\$(TargetConfiguration)\sos.unittests_$(Timestamp)</LogDir>
<DumpDir>$(RootBinDir)\tmp\$(TargetConfiguration)\dumps</DumpDir>
- <CDBPath>$(RootBinDir)\bin\SOS.UnitTests\$(TargetConfiguration)\netcoreapp2.1\publish\runtimes\win-$(TargetArchitecture)\native\cdb.exe</CDBPath>
+ <CDBPath>$(RootBinDir)\bin\SOS.UnitTests\$(TargetConfiguration)\netcoreapp3.1\publish\runtimes\win-$(TargetArchitecture)\native\cdb.exe</CDBPath>
<CDBHelperExtension>$(InstallDir)\runcommand.dll</CDBHelperExtension>
<TestLatestOnly>false</TestLatestOnly>
<TestDesktop Condition="'$(TargetArchitecture)' == 'arm64'">false</TestDesktop>
<!-- Build the debuggee for this framework version but run it on latest -->
- <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '5')">netcoreapp3.1</BuildProjectFrameworkLatest>
+ <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '6')">net5.0</BuildProjectFrameworkLatest>
+ <BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '5')">net5.0</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '3.1')">netcoreapp3.1</BuildProjectFrameworkLatest>
<BuildProjectFrameworkLatest Condition="StartsWith('$(RuntimeVersionLatest)', '2.1')">netcoreapp2.1</BuildProjectFrameworkLatest>
<DebuggeeSourceRoot>$(RepoRootDir)\src\SOS\SOS.UnitTests\Debuggees</DebuggeeSourceRoot>
<DebuggeeBuildProcess>sdk.prebuilt</DebuggeeBuildProcess>
<DebuggeeBuildRoot>$(RootBinDir)</DebuggeeBuildRoot>
- <!-- Always build with x64 bit dotnet -->
- <CliPath>$(RepoRootDir)\.dotnet\dotnet.exe</CliPath>
+ <CliPath>$(DotNetRoot)\dotnet.exe</CliPath>
<NuGetPackageFeeds>
myget.org dotnet-core=https://dotnet.myget.org/F/dotnet-core/api/v3/index.json;
target_link_libraries(DesktopClrHost ${DESKTOPCLRHOST_LIBRARY})
install(TARGETS DesktopClrHost DESTINATION ${CLR_MANAGED_BINARY_DIR}/WebApp3/${CLR_BUILD_TYPE}/netcoreapp3.1)
+install(TARGETS DesktopClrHost DESTINATION ${CLR_MANAGED_BINARY_DIR}/WebApp3/${CLR_BUILD_TYPE}/net5.0)
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
</Project>
<OutputType>Exe</OutputType>
<Optimize>true</Optimize>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<DefineConstants Condition="'$(TargetFramework)' == 'net462'">$(DefineConstants);FULL_CLR</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == '' and '$(OS)' != 'Windows_NT'">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == '' and '$(OS)' == 'Windows_NT'">net462;netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == '' and '$(OS)' != 'Windows_NT'">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == '' and '$(OS)' == 'Windows_NT'">net462;netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
</Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework Condition="'$(BuildProjectFramework)' != ''">$(BuildProjectFramework)</TargetFramework>
- <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks Condition="'$(BuildProjectFramework)' == ''">netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using System;
+using System.IO;
using System.Net.Http;
+using System.Reflection;
using System.Runtime.InteropServices;
+using System.Security.Cryptography.X509Certificates;
using System.Threading;
namespace WebApp3
}
}
- public static IHostBuilder CreateHostBuilder(string[] args) =>
- Host.CreateDefaultBuilder(args).ConfigureWebHostDefaults(webBuilder =>
- webBuilder.UseStartup<Startup>());
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args).ConfigureWebHostDefaults(webBuilder => {
+ webBuilder.ConfigureKestrel(serverOptions => {
+ serverOptions.ConfigureHttpsDefaults(httpsOptions => {
+ string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+ httpsOptions.ServerCertificate = new X509Certificate2(Path.Combine(directory, "testCert.pfx"), "testPassword");
+ });
+ });
+ webBuilder.UseStartup<Startup>();
+ });
}
}
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
- <TargetFramework>netcoreapp3.1</TargetFramework>
+ <TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
+ <ItemGroup>
+ <Content Include="$(MSBuildThisFileDirectory)testCert.pfx">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Content>
+ </ItemGroup>
+
</Project>
<Import Project="$(RepositoryEngineeringDir)\InstallRuntimes.proj" />
<PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<NoWarn>;1591;1701</NoWarn>
<DefineConstants>$(DefineConstants);CORE_CLR</DefineConstants>
if (testDump)
{
- // Generate a crash dump.
- if (information.TestConfiguration.DebuggeeDumpOutputRootDir() != null)
+ // Create and test dumps on OSX only if the runtime is 5.0 or greater
+ if (OS.Kind != OSKind.OSX || information.TestConfiguration.RuntimeFrameworkVersionMajor >= 5)
{
- if (information.DumpGenerator == SOSRunner.DumpGenerator.NativeDebugger && SOSRunner.IsAlpine())
+ // Generate a crash dump.
+ if (information.TestConfiguration.DebuggeeDumpOutputRootDir() != null)
{
- throw new SkipTestException("lldb tests not supported on Alpine");
+ if (information.DumpGenerator == SOSRunner.DumpGenerator.NativeDebugger && SOSRunner.IsAlpine())
+ {
+ throw new SkipTestException("lldb tests not supported on Alpine");
+ }
+ await SOSRunner.CreateDump(information);
}
- await SOSRunner.CreateDump(information);
- }
- // Test against a crash dump.
- if (information.TestConfiguration.DebuggeeDumpInputRootDir() != null)
- {
- if (!SOSRunner.IsAlpine())
+ // Test against a crash dump.
+ if (information.TestConfiguration.DebuggeeDumpInputRootDir() != null)
{
- // With cdb (Windows) or lldb (Linux or OSX)
- using (SOSRunner runner = await SOSRunner.StartDebugger(information, SOSRunner.DebuggerAction.LoadDump))
+ if (!SOSRunner.IsAlpine() && OS.Kind != OSKind.OSX)
{
- await runner.RunScript(scriptName);
+ // With cdb (Windows) or lldb (Linux)
+ using (SOSRunner runner = await SOSRunner.StartDebugger(information, SOSRunner.DebuggerAction.LoadDump))
+ {
+ await runner.RunScript(scriptName);
+ }
}
- }
- // Using the dotnet-dump analyze tool if the path exists in the config file. Don't test dotnet-dump on triage dumps when running on desktop CLR.
- if (information.TestConfiguration.DotNetDumpPath() != null && (information.TestConfiguration.IsNETCore || information.DumpType != SOSRunner.DumpType.Triage))
- {
- using (SOSRunner runner = await SOSRunner.StartDebugger(information, SOSRunner.DebuggerAction.LoadDumpWithDotNetDump))
+ // Using the dotnet-dump analyze tool if the path exists in the config file.
+ if (information.TestConfiguration.DotNetDumpPath() != null)
{
- await runner.RunScript(scriptName);
+ // Don't test dotnet-dump on triage dumps when running on desktop CLR.
+ if (information.TestConfiguration.IsNETCore || information.DumpType != SOSRunner.DumpType.Triage)
+ {
+ using (SOSRunner runner = await SOSRunner.StartDebugger(information, SOSRunner.DebuggerAction.LoadDumpWithDotNetDump))
+ {
+ await runner.RunScript(scriptName);
+ }
+ }
}
}
}
// Get the full debuggee launch command line (includes the host if required)
string exePath = debuggeeConfig.BinaryExePath;
var arguments = new StringBuilder();
+
if (!string.IsNullOrWhiteSpace(config.HostExe))
{
exePath = config.HostExe;
// Create the debuggee process runner
ProcessRunner processRunner = new ProcessRunner(exePath, ReplaceVariables(variables, arguments.ToString())).
+ WithEnvironmentVariable("COMPlus_DbgEnableElfDumpOnMacOS", "1").
WithLog(new TestRunner.TestLogger(outputHelper.IndentedOutput)).
WithTimeout(TimeSpan.FromMinutes(5));
if (dumpGeneration == DumpGenerator.CreateDump)
{
- if (OS.Kind == OSKind.OSX)
- {
- throw new SkipTestException("Createdump doesn't exists on MacOS");
- }
// Run the debuggee with the createdump environment variables set to generate a coredump on unhandled exception
processRunner.
WithEnvironmentVariable("COMPlus_DbgEnableMiniDump", "1").
// Start dotnet-dump collect
var dotnetDumpArguments = new StringBuilder();
dotnetDumpArguments.Append(config.DotNetDumpPath());
- dotnetDumpArguments.AppendFormat(" collect --process-id {0} --output %DUMP_NAME%", processRunner.ProcessId);
+ dotnetDumpArguments.AppendFormat(" collect --diag --process-id {0} --output %DUMP_NAME%", processRunner.ProcessId);
ProcessRunner dotnetDumpRunner = new ProcessRunner(config.DotNetDumpHost(), ReplaceVariables(variables, dotnetDumpArguments.ToString())).
WithLog(new TestRunner.TestLogger(dotnetDumpOutputHelper)).
string debuggerPath = GetNativeDebuggerPath(debugger, config);
if (string.IsNullOrWhiteSpace(debuggerPath) || !File.Exists(debuggerPath))
{
- throw new FileNotFoundException($"Native debugger path not set or does not exist: {debuggerPath}");
+ throw new FileNotFoundException($"Native debugger ({debugger}) path not set or does not exist: {debuggerPath}");
}
// Get the debugger arguments and commands to run initially
}
}
+void DisplayInvalidStructuresMessage()
+{
+ ExtOut("The garbage collector data structures are not in a valid state for traversal.\n");
+ ExtOut("It is either in the \"plan phase,\" where objects are being moved around, or\n");
+ ExtOut("we are at the initialization or shutdown of the gc heap. Commands related to \n");
+ ExtOut("displaying, finding or traversing objects as well as gc heap segments may not \n");
+ ExtOut("work properly. !dumpheap and !verifyheap may incorrectly complain of heap \n");
+ ExtOut("consistency errors.\n");
+}
+
HRESULT PrintObj(TADDR taObj, BOOL bPrintFields = TRUE)
{
if (!sos::IsObject(taObj, true))
{
ExtOut("<Note: this object has an invalid CLASS field>\n");
+ if (!GetGcStructuresValid())
+ {
+ DisplayInvalidStructuresMessage();
+ }
}
DacpObjectData objData;
DacpObjectData objData;
if ((Status=objData.Request(g_sos, taObj)) != S_OK)
{
- ExtOut("Invalid object\n");
+ ExtOut("Invalid exception object: %016llx\n", taObj);
+ if (!GetGcStructuresValid())
+ {
+ DisplayInvalidStructuresMessage();
+ }
return Status;
}
#endif // FEATURE_PAL
-void DisplayInvalidStructuresMessage()
-{
- ExtOut("The garbage collector data structures are not in a valid state for traversal.\n");
- ExtOut("It is either in the \"plan phase,\" where objects are being moved around, or\n");
- ExtOut("we are at the initialization or shutdown of the gc heap. Commands related to \n");
- ExtOut("displaying, finding or traversing objects as well as gc heap segments may not \n");
- ExtOut("work properly. !dumpheap and !verifyheap may incorrectly complain of heap \n");
- ExtOut("consistency errors.\n");
-}
-
/**********************************************************************\
* Routine Description: *
* *