Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add message about internal inclustion of IsExternalInit
  • Loading branch information
Rosuavio committed May 10, 2021
commit 5a4112c8da86bcd1c160445efcf9d5f9d2b83b39
7 changes: 7 additions & 0 deletions UnitTests/UnitTests.UWP/IsExternalInit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

namespace System.Runtime.CompilerServices
{
// HACK (2021.05.07): Included as a workaround for multiple occurrences of
// error CS0518: Predefined type 'System.Runtime.CompilerServices.IsExternalInit' is not defined or imported
// in UnitTests\UnitTests.UWP\UI\Controls\Test_RangeSelector.cs.
// This is caused by using [Positional Records](https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#record-types)
// 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,
// and currently the type is only included net5.0 and up.
// The recommended action is to include the type manually. https://developercommunity.visualstudio.com/t/error-cs0518-predefined-type-systemruntimecompiler/1244809#T-N1249582
internal static class IsExternalInit
{
}
Expand Down