After installing VS 2019 preview 2 i get a great number of errors. Error demo code:
public class Class1 {
public static async IAsyncEnumerable<int> Get()
{
for( int i = 0; i < 10; i++ ) {
await Task.Delay( 100 );
yield return i;
}
}
}
and nothig more (a new dll project)!
With preview 1 was ok.
The project:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
</Project>
The error message is: Error CS0656 Missing compiler required member 'System.Collections.Generic.IAsyncEnumerable`1.GetAsyncEnumerator'
Object Browser shows the member in Collections.Generic.
Any ideas? Waiting for Core 3.0 preview 2?
Something like in IAsyncEnumerable not working in C# 8.0 preview ?
Another problem with VS 2019 P2 (another project): Nullabilty warnings though NullableReferenceTypes line is there (in vs 19, preview 1 was ok):
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<LangVersion>8.0</LangVersion>
**<NullableReferenceTypes>true</NullableReferenceTypes>**
The warning:
Warning CS8632 The annotation for nullable reference types should only be used in code within a '#nullable' context.
Is project setting not enough? not global any more?