Skip to content

Commit 8950e74

Browse files
committed
Fixed #2814 and #2853.
1 parent 7045302 commit 8950e74

File tree

5 files changed

+46
-6
lines changed

5 files changed

+46
-6
lines changed

scripts/build.ps1

+8
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ function Publish-Package
346346
$netstandard13PackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFrameworkNS13");
347347
$netstandard20PackageDir = $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFrameworkNS20");
348348
$coreCLR20PackageDir = Get-CoreCLR20PackageDirectory
349+
$coreCLR10PackageDir = Get-CoreCLR10PackageDirectory
349350
$coreCLR20TestHostPackageDir = Get-CoreCLR20TestHostPackageDirectory
350351
$packageProject = Join-Path $env:TP_PACKAGE_PROJ_DIR "package\package.csproj"
351352
$testHostProject = Join-Path $env:TP_ROOT_DIR "src\testhost\testhost.csproj"
@@ -480,6 +481,8 @@ function Publish-Package
480481
-files @{
481482
$TPB_TargetFramework45 = $fullCLRPackage45Dir # net45
482483
$TPB_TargetFramework451 = $fullCLRPackage451Dir # net451
484+
$TPB_TargetFrameworkCore10 = $coreCLR10PackageDir # netcoreapp1.0
485+
$TPB_TargetFrameworkCore20 = $coreCLR20PackageDir # netcoreapp2.1
483486
$TPB_TargetFrameworkNS10 = $netstandard10PackageDir # netstandard1_0
484487
$TPB_TargetFrameworkNS13 = $netstandard13PackageDir # netstandard1_3
485488
$TPB_TargetFrameworkNS20 = $netstandard20PackageDir # netstandard2_0
@@ -1042,6 +1045,11 @@ function Get-CoreCLR20PackageDirectory
10421045
return $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFrameworkCore20")
10431046
}
10441047

1048+
function Get-CoreCLR10PackageDirectory
1049+
{
1050+
return $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFrameworkCore10")
1051+
}
1052+
10451053
function Get-CoreCLR20TestHostPackageDirectory
10461054
{
10471055
return $(Join-Path $env:TP_OUT_DIR "$TPB_Configuration\$TPB_TargetFrameworkCore20\TestHost")

scripts/verify-nupkgs.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ function Verify-Nuget-Packages($packageDirectory, $version)
1616
"Microsoft.NET.Test.Sdk" = 27;
1717
"Microsoft.TestPlatform" = 492;
1818
"Microsoft.TestPlatform.Build" = 21;
19-
"Microsoft.TestPlatform.CLI" = 366;
19+
"Microsoft.TestPlatform.CLI" = 367;
2020
"Microsoft.TestPlatform.Extensions.TrxLogger" = 35;
21-
"Microsoft.TestPlatform.ObjectModel" = 180;
21+
"Microsoft.TestPlatform.ObjectModel" = 238;
2222
"Microsoft.TestPlatform.AdapterUtilities" = 62;
2323
"Microsoft.TestPlatform.Portable" = 596;
2424
"Microsoft.TestPlatform.TestHost" = 214;

src/Microsoft.TestPlatform.ObjectModel/Microsoft.TestPlatform.ObjectModel.csproj

+4-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
<Import Project="$(TestPlatformRoot)scripts/build/TestPlatform.Settings.targets" />
77
<PropertyGroup>
88
<AssemblyName>Microsoft.VisualStudio.TestPlatform.ObjectModel</AssemblyName>
9-
<TargetFrameworks>net45;net451;netstandard2.0;netstandard1.3</TargetFrameworks>
9+
<TargetFrameworks>net45;net451;netcoreapp2.1;netcoreapp1.0;netstandard2.0;netstandard1.3</TargetFrameworks>
1010
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">$(TargetFrameworks);uap10.0;netstandard1.0</TargetFrameworks>
1111
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">netstandard2.0;netstandard1.3;netstandard1.0</TargetFrameworks>
1212
<PackageId>Microsoft.TestPlatform.ObjectModel</PackageId>
13+
<CheckEolTargetFramework>false</CheckEolTargetFramework>
1314
</PropertyGroup>
1415
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0'">
1516
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
@@ -42,7 +43,7 @@
4243
<PackageReference Include="System.Runtime" Version="4.3.0" />
4344
</ItemGroup>
4445

45-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
46+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.3' OR '$(TargetFramework)' == 'netcoreapp1.0'">
4647
<PackageReference Include="System.Reflection.Metadata" Version="1.6.0" />
4748
<PackageReference Include="System.ComponentModel.EventBasedAsync" Version="4.3.0" />
4849
<PackageReference Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
@@ -56,7 +57,7 @@
5657
<PackageReference Include="NuGet.Frameworks" Version="4.6.4" />
5758
</ItemGroup>
5859

59-
<ItemGroup Condition="!$(TargetFramework.StartsWith('netstandard1')) AND '$(TargetFramework)' != 'uap10.0'">
60+
<ItemGroup Condition="!$(TargetFramework.StartsWith('netstandard1')) AND '$(TargetFramework)' != 'uap10.0' AND '$(TargetFramework)' != 'netcoreapp1.0'">
6061
<PackageReference Include="System.Reflection.Metadata" Version="1.6.0" />
6162
<PackageReference Include="NuGet.Frameworks" Version="$(NuGetFrameworksVersion)" />
6263
</ItemGroup>

src/Microsoft.TestPlatform.ObjectModel/Navigation/PortableSymbolReader.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private void PopulateCacheForTypeAndMethodSymbols(string binaryPath)
101101
}
102102
catch (FileNotFoundException)
103103
{
104-
#if !NETSTANDARD1_3 && !WINDOWS_UWP
104+
#if !NETSTANDARD1_3 && !WINDOWS_UWP && !NETCOREAPP1_0
105105
// fallback when the assembly is not loaded
106106
asm = Assembly.LoadFile(binaryPath);
107107
#else

src/package/nuspec/TestPlatform.ObjectModel.nuspec

+31
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@
2929
<dependency id="System.Reflection.Metadata" version="[1.6.0, )" />
3030
<dependency id="NuGet.Frameworks" version="[5.0.0, )" />
3131
</group>
32+
33+
<group targetFramework="netcoreapp1.0">
34+
<dependency id="System.Reflection.Metadata" version="[1.6.0, )" />
35+
<dependency id="NuGet.Frameworks" version="4.6.4" />
36+
</group>
37+
38+
<group targetFramework="netcoreapp2.1">
39+
<dependency id="System.Reflection.Metadata" version="[1.6.0, )" />
40+
<dependency id="NuGet.Frameworks" version="[5.0.0, )" />
41+
</group>
3242

3343
<group targetFramework="netstandard1.0">
3444
<dependency id="System.ComponentModel.EventBasedAsync" version="[4.3.0, )" />
@@ -84,6 +94,7 @@
8494
<files>
8595
<file src="Icon.png" target="" />
8696
<file src="licenses\LICENSE_NET.txt" target="" />
97+
8798
<!-- net45 -->
8899
<file src="net45\$Runtime$\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll" target="lib\net45\" />
89100
<file src="net45\$Runtime$\Microsoft.TestPlatform.CoreUtilities.dll" target="lib\net45\" />
@@ -152,6 +163,26 @@
152163
<file src="net451\$Runtime$\zh-Hant\Microsoft.TestPlatform.CoreUtilities.resources.dll" target="lib\net451\zh-Hant" />
153164
<!-- /net451 -->
154165

166+
<!-- netcoreapp1.0 -->
167+
<file src="netcoreapp1.0\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll" target="lib\netcoreapp1.0\" />
168+
<file src="netcoreapp1.0\Microsoft.TestPlatform.CoreUtilities.dll" target="lib\netcoreapp1.0\" />
169+
<file src="netcoreapp1.0\Microsoft.TestPlatform.PlatformAbstractions.dll" target="lib\netcoreapp1.0\" />
170+
171+
<!-- Add localized resources -->
172+
<file src="netcoreapp1.0\**\Microsoft.VisualStudio.TestPlatform.ObjectModel.*resources.dll" exclude="**\TestHost\**\*.*" target="lib\netcoreapp1.0\" />
173+
<file src="netcoreapp1.0\**\Microsoft.TestPlatform.CoreUtilities.resources.dll" exclude="**\TestHost\**\*.*" target="lib\netcoreapp1.0\" />
174+
<!-- /netcoreapp1.0 -->
175+
176+
<!-- netcoreapp2.1 -->
177+
<file src="netcoreapp2.1\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll" target="lib\netcoreapp2.1\" />
178+
<file src="netcoreapp2.1\Microsoft.TestPlatform.CoreUtilities.dll" target="lib\netcoreapp2.1\" />
179+
<file src="netcoreapp2.1\Microsoft.TestPlatform.PlatformAbstractions.dll" target="lib\netcoreapp2.1\" />
180+
181+
<!-- Add localized resources -->
182+
<file src="netcoreapp2.1\**\Microsoft.VisualStudio.TestPlatform.ObjectModel.*resources.dll" exclude="**\TestHost\**\*.*" target="lib\netcoreapp2.1\" />
183+
<file src="netcoreapp2.1\**\Microsoft.TestPlatform.CoreUtilities.resources.dll" exclude="**\TestHost\**\*.*" target="lib\netcoreapp2.1\" />
184+
<!-- /netcoreapp2.1 -->
185+
155186
<!-- netstandard 1.0 -->
156187
<file src="$NetStandard10Framework$\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll" target="lib\netstandard1.0\" />
157188
<file src="$NetStandard10Framework$\Microsoft.TestPlatform.CoreUtilities.dll" target="lib\netstandard1.0\" />

0 commit comments

Comments
 (0)