Skip to content

Commit 5a4112c

Browse files
committed
Add message about internal inclustion of IsExternalInit
1 parent 5c49632 commit 5a4112c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

UnitTests/UnitTests.UWP/IsExternalInit.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
namespace System.Runtime.CompilerServices
66
{
7+
// HACK (2021.05.07): Included as a workaround for multiple occurrences of
8+
// error CS0518: Predefined type 'System.Runtime.CompilerServices.IsExternalInit' is not defined or imported
9+
// in UnitTests\UnitTests.UWP\UI\Controls\Test_RangeSelector.cs.
10+
// This is caused by using [Positional Records](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#record-types)
11+
// which use [Init Only setters](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#init-only-setters) under the hood for all the properties,
12+
// and currently the type is only included net5.0 and up.
13+
// The recommended action is to include the type manually. https://developercommunity.visualstudio.com/t/error-cs0518-predefined-type-systemruntimecompiler/1244809#T-N1249582
714
internal static class IsExternalInit
815
{
916
}

0 commit comments

Comments
 (0)