Skip to content

Commit 382e8d0

Browse files
committed
Fix to allow init in props in no net5 projects
allows non-verbose record decerlation syntax Fix for "error CS0518: Predefined type 'System.Runtime.CompilerServices.IsExternalInit' is not defined or imported" see https://stackoverflow.com/questions/64749385/predefined-type-system-runtime-compilerservices-isexternalinit-is-not-defined https://developercommunity.visualstudio.com/t/error-cs0518-predefined-type-systemruntimecompiler/1244809
1 parent e348f61 commit 382e8d0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
namespace System.Runtime.CompilerServices
6+
{
7+
internal static class IsExternalInit { }
8+
}

UnitTests/UnitTests.UWP/UnitTests.UWP.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
<Compile Include="Helpers\Test_StorageHelper.cs" />
175175
<Compile Include="Helpers\Test_StreamHelper.cs" />
176176
<Compile Include="Helpers\Test_DeepLinkParser.cs" />
177+
<Compile Include="IsExternalInit.cs" />
177178
<Compile Include="Markdown\Parse\BoldTests.cs" />
178179
<Compile Include="Markdown\Parse\CodeTests.cs" />
179180
<Compile Include="Markdown\Parse\HeaderTests.cs" />

0 commit comments

Comments
 (0)