Fix dotnet-dump when running on preview 6 (#326)
authorMike McLaughlin <mikem@microsoft.com>
Tue, 11 Jun 2019 20:59:10 +0000 (13:59 -0700)
committerGitHub <noreply@github.com>
Tue, 11 Jun 2019 20:59:10 +0000 (13:59 -0700)
Fix dotnet-dump when running on preview 6

When the 3.0 preview 6 runtime is the only one available, it causes
dotnet-dump to throw a missing method exception. This is because it
tries to load the wrong SOS.NETCore.dll assembly from the runtime
directory instead of the one that comes with dotnet-dump/SOS.

The workaround is to change the SOS.NETCore assembly version
to 4.8.0.x which is greater than the 4.7.x version of the
preview 6 runtime.

Fix scheduled build that only has 3.0.x installed

eng/install-test-runtimes.ps1
eng/install-test-runtimes.sh
src/SOS/SOS.NETCore/SOS.NETCore.csproj

index 00b1a0186e33f94366e5a3272c63ad5d59183cec..ed0181564074f8d9876acd73185e59e3d2ce7192 100644 (file)
@@ -16,13 +16,15 @@ $RuntimeVersion21="2.1.11"
 $RuntimeVersion22="2.2.5"
 $DailyTestText="true"
 
+# Always install 2.1 for the daily test (scheduled builds) scenario because xunit needs it
+. $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersion21 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime dotnet -InstallDir $DotNetDir
+
 # Install the other versions of .NET Core runtime we are going to test. 1.1.x, 2.1.x, 2.2.x
 # and latest. Only install the latest master for daily jobs and leave the RuntimeVersion* 
 # config properties blank.
 if (!$DailyTest) {
     $DailyTestText="false"
     . $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersion11 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime dotnet -InstallDir $DotNetDir
-    . $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersion21 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime dotnet -InstallDir $DotNetDir
     . $DotNetDir\dotnet-install.ps1 -Version $RuntimeVersion22 -Architecture $BuildArch -SkipNonVersionedFiles -Runtime dotnet -InstallDir $DotNetDir
 }
 
index 986e0c5a372b37388c63a2cf3e4de3fed25098b9..9096c01887331f36225ff29384582edbc3fc07f0 100755 (executable)
@@ -48,13 +48,15 @@ done
 
 daily_test_text="true"
 
+# Always install 2.1 for the daily test (scheduled builds) scenario because xunit needs it
+bash "$dotnet_dir/dotnet-install.sh" --version "$runtime_version_21" --architecture "$build_arch" --skip-non-versioned-files --runtime dotnet --install-dir "$dotnet_dir"
+
 # Install the other versions of .NET Core runtime we are going to test. 1.1.x, 2.1.x, 2.2.x
 # and latest. Only install the latest master for daily jobs and leave the RuntimeVersion* 
 # config properties blank.
 if [ $daily_test == 0 ]; then
     daily_test_text="false"
     bash "$dotnet_dir/dotnet-install.sh" --version "$runtime_version_11" --architecture "$build_arch" --skip-non-versioned-files --runtime dotnet --install-dir "$dotnet_dir"
-    bash "$dotnet_dir/dotnet-install.sh" --version "$runtime_version_21" --architecture "$build_arch" --skip-non-versioned-files --runtime dotnet --install-dir "$dotnet_dir"
     bash "$dotnet_dir/dotnet-install.sh" --version "$runtime_version_22" --architecture "$build_arch" --skip-non-versioned-files --runtime dotnet --install-dir "$dotnet_dir"
 fi
 
index 4c57095b1dcac94095eaf5da707bc2612b7d654c..05949636f4ac6d4b0520b25f8ae69801766f834b 100644 (file)
@@ -6,6 +6,7 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <NoWarn>;1591;1701</NoWarn>
     <Description>.NET Core SOS</Description>
+    <VersionPrefix>4.8.0</VersionPrefix>
   </PropertyGroup>
   
   <ItemGroup>