Skip to content

Commit 490850a

Browse files
authored
Make the warning error, and restore previous props so we attempt to run (#15078)
* Make the warning error, and restore previous props so we get errors when user suppresses * Update src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec * Correct file count, because we are adding more props * Wrong edit
1 parent 47eb51b commit 490850a

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

eng/verify-nupkgs.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function Verify-Nuget-Packages {
1818
Write-Host "Starting Verify-Nuget-Packages."
1919
$expectedNumOfFiles = @{
2020
"Microsoft.CodeCoverage" = 59;
21-
"Microsoft.NET.Test.Sdk" = 20;
21+
"Microsoft.NET.Test.Sdk" = 25;
2222
"Microsoft.TestPlatform" = 619;
2323
"Microsoft.TestPlatform.Build" = 20;
2424
"Microsoft.TestPlatform.CLI" = 481;

src/package/Microsoft.NET.Test.Sdk/Microsoft.NET.Test.Sdk.nuspec

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88
<dependency id="Microsoft.TestPlatform.TestHost" version="$Version$" />
99
<dependency id="Microsoft.CodeCoverage" version="$Version$" />
1010
</group>
11+
1112
<group targetFramework="net462">
1213
<!-- TestHost gets shipped with vstest.console -->
1314
<dependency id="Microsoft.CodeCoverage" version="$Version$" />
1415
</group>
16+
17+
<group targetFramework="native0.0">
18+
</group>
19+
1520
</dependencies>
1621
</metadata>
1722

@@ -26,13 +31,22 @@
2631
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.props" target="build\net8.0\" />
2732
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.props" target="build\net462\" />
2833

29-
<!-- Add incompatibility warning. -->
34+
<!-- Add incompatibility error, and add the props, in case user decides to ignore it. -->
35+
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.props" target="buildMultiTargeting\netcoreapp2.0\" />
3036
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.targets" target="buildMultiTargeting\netcoreapp2.0\" />
37+
38+
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.props" target="build\netcoreapp2.0\" />
3139
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.targets" target="build\netcoreapp2.0\" />
40+
41+
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.props" target="buildMultiTargeting\netstandard2.0\" />
3242
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.targets" target="buildMultiTargeting\netstandard2.0\" />
43+
44+
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.props" target="build\netstandard2.0\" />
3345
<file src="netstandard2.0\Microsoft.NET.Test.Sdk.targets" target="build\netstandard2.0\" />
3446

3547
<file src="netstandard2.0\_._" target="lib/net8.0" />
3648
<file src="netstandard2.0\_._" target="lib/net462" />
49+
50+
<file src="netstandard2.0\_._" target="lib/native" />
3751
</files>
3852
</package>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project InitialTargets="NonCompatibleTargetFrameworkError_Microsoft_NET_Test_Sdk_net8_0">
22
<Target Name="NonCompatibleTargetFrameworkError_Microsoft_NET_Test_Sdk_net8_0"
3-
Condition="'$(SuppressTfmSupportBuildWarnings)' == ''">
4-
<Warning Text="Microsoft.NET.Test.Sdk doesn't support $(TargetFramework) and has not been tested with it. Consider upgrading your TargetFramework to net8.0 or later. You may also set &lt;SuppressTfmSupportBuildWarnings&gt;true&lt;/SuppressTfmSupportBuildWarnings&gt; in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk." />
3+
Condition="'$(SuppressTfmSupportBuildErrors)' == ''">
4+
<Error Text="Microsoft.NET.Test.Sdk doesn't support $(TargetFramework) and has not been tested with it. Consider upgrading your TargetFramework to net8.0 or later. You may also set &lt;SuppressTfmSupportBuildErrors&gt;true&lt;/SuppressTfmSupportBuildErrors&gt; in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk." />
55
</Target>
66
</Project>

0 commit comments

Comments
 (0)