Skip to content

Commit efe3122

Browse files
author
Oren Novotny
committed
Add detection for desktop .net framework and skip running certain tests if not executing there
1 parent 07eb6b9 commit efe3122

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildACrossTargetedLibrary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void It_builds_desktop_library_successfully_on_windows()
8686
[Fact]
8787
public void It_builds_all_targets_library_successfully_on_windows()
8888
{
89-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
89+
if (!UsingFullFrameworkMSBuild)
9090
{
9191
return;
9292
}

test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithTfm.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class GivenThatWeWantToBuildALibraryWithTfm : SdkTest
2323
[Fact]
2424
public void It_builds_the_monoandroid_library_successfully_on_windows()
2525
{
26-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
26+
if (!UsingFullFrameworkMSBuild)
2727
{
2828
return;
2929
}
@@ -54,7 +54,7 @@ public void It_builds_the_monoandroid_library_successfully_on_windows()
5454
[Fact]
5555
public void It_builds_the_net40_client_library_successfully_on_windows()
5656
{
57-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
57+
if (!UsingFullFrameworkMSBuild)
5858
{
5959
return;
6060
}
@@ -86,7 +86,7 @@ public void It_builds_the_net40_client_library_successfully_on_windows()
8686
[Fact]
8787
public void It_builds_the_net45_library_successfully_on_windows()
8888
{
89-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
89+
if (!UsingFullFrameworkMSBuild)
9090
{
9191
return;
9292
}
@@ -145,7 +145,7 @@ public void It_builds_the_netstandard15_library_successfully()
145145
[Fact]
146146
public void It_builds_the_portable_profile44_library_successfully_on_windows()
147147
{
148-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
148+
if (!UsingFullFrameworkMSBuild)
149149
{
150150
return;
151151
}
@@ -178,7 +178,7 @@ public void It_builds_the_portable_profile44_library_successfully_on_windows()
178178
[Fact]
179179
public void It_builds_the_portable_profile151_library_successfully_on_windows()
180180
{
181-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
181+
if (!UsingFullFrameworkMSBuild)
182182
{
183183
return;
184184
}
@@ -210,7 +210,7 @@ public void It_builds_the_portable_profile151_library_successfully_on_windows()
210210
[Fact]
211211
public void It_builds_the_portable_profile259_library_successfully_on_windows()
212212
{
213-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
213+
if (!UsingFullFrameworkMSBuild)
214214
{
215215
return;
216216
}
@@ -242,7 +242,7 @@ public void It_builds_the_portable_profile259_library_successfully_on_windows()
242242
[Fact]
243243
public void It_builds_the_sl5_library_successfully_on_windows()
244244
{
245-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
245+
if (!UsingFullFrameworkMSBuild)
246246
{
247247
return;
248248
}
@@ -274,7 +274,7 @@ public void It_builds_the_sl5_library_successfully_on_windows()
274274
[Fact]
275275
public void It_builds_the_win8_library_successfully_on_windows()
276276
{
277-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
277+
if (!UsingFullFrameworkMSBuild)
278278
{
279279
return;
280280
}
@@ -307,7 +307,7 @@ public void It_builds_the_win8_library_successfully_on_windows()
307307
[Fact]
308308
public void It_builds_the_win81_library_successfully_on_windows()
309309
{
310-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
310+
if (!UsingFullFrameworkMSBuild)
311311
{
312312
return;
313313
}
@@ -340,7 +340,7 @@ public void It_builds_the_win81_library_successfully_on_windows()
340340
[Fact]
341341
public void It_builds_the_wp8_library_successfully_on_windows()
342342
{
343-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
343+
if (!UsingFullFrameworkMSBuild)
344344
{
345345
return;
346346
}
@@ -372,7 +372,7 @@ public void It_builds_the_wp8_library_successfully_on_windows()
372372
[Fact]
373373
public void It_builds_the_wp81_library_successfully_on_windows()
374374
{
375-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
375+
if (!UsingFullFrameworkMSBuild)
376376
{
377377
return;
378378
}
@@ -404,7 +404,7 @@ public void It_builds_the_wp81_library_successfully_on_windows()
404404
[Fact]
405405
public void It_builds_the_wpa81_library_successfully_on_windows()
406406
{
407-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
407+
if (!UsingFullFrameworkMSBuild)
408408
{
409409
return;
410410
}
@@ -437,7 +437,7 @@ public void It_builds_the_wpa81_library_successfully_on_windows()
437437
[Fact]
438438
public void It_builds_the_uap10_0_library_successfully_on_windows()
439439
{
440-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
440+
if (!UsingFullFrameworkMSBuild)
441441
{
442442
return;
443443
}
@@ -469,7 +469,7 @@ public void It_builds_the_uap10_0_library_successfully_on_windows()
469469
[Fact]
470470
public void It_builds_the_xamarinios_library_successfully_on_windows()
471471
{
472-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
472+
if (!UsingFullFrameworkMSBuild)
473473
{
474474
return;
475475
}
@@ -501,7 +501,7 @@ public void It_builds_the_xamarinios_library_successfully_on_windows()
501501
[Fact]
502502
public void It_builds_the_xamarinmac_library_successfully_on_windows()
503503
{
504-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
504+
if (!UsingFullFrameworkMSBuild)
505505
{
506506
return;
507507
}
@@ -532,7 +532,7 @@ public void It_builds_the_xamarinmac_library_successfully_on_windows()
532532
[Fact]
533533
public void It_builds_the_xamarintvos_library_successfully_on_windows()
534534
{
535-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
535+
if (!UsingFullFrameworkMSBuild)
536536
{
537537
return;
538538
}
@@ -564,7 +564,7 @@ public void It_builds_the_xamarintvos_library_successfully_on_windows()
564564
[Fact]
565565
public void It_builds_the_xamarinwatchos_library_successfully_on_windows()
566566
{
567-
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
567+
if (!UsingFullFrameworkMSBuild)
568568
{
569569
return;
570570
}

0 commit comments

Comments
 (0)