You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: UnitTests/UnitTests.UWP/IsExternalInit.cs
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,13 @@
4
4
5
5
namespaceSystem.Runtime.CompilerServices
6
6
{
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
0 commit comments