-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ManualResetValueTaskSourceLogic`1 missing in System.Private.CoreLib #11612
Comments
Was renamed to |
Ah, looks like mismatch between C#8 and the runtime? /cc @stephentoub |
I was also unable to find |
It's not missing exactly, but like @benaadams said things are just out-of-sync between the compiler and library in Preview 1. The compiler is looking for the old design ( namespace System.Threading.Tasks
{
using System.Runtime.CompilerServices;
using System.Threading.Tasks.Sources;
internal struct ManualResetValueTaskSourceLogic<TResult>
{
private ManualResetValueTaskSourceCore<TResult> _core;
public ManualResetValueTaskSourceLogic(IStrongBox<ManualResetValueTaskSourceLogic<TResult>> parent) : this() { }
public short Version => _core.Version;
public TResult GetResult(short token) => _core.GetResult(token);
public ValueTaskSourceStatus GetStatus(short token) => _core.GetStatus(token);
public void OnCompleted(Action<object> continuation, object state, short token, ValueTaskSourceOnCompletedFlags flags) => _core.OnCompleted(continuation, state, token, flags);
public void Reset() => _core.Reset();
public void SetResult(TResult result) => _core.SetResult(result);
public void SetException(Exception error) => _core.SetException(error);
}
}
namespace System.Runtime.CompilerServices
{
internal interface IStrongBox<T> { ref T Value { get; } }
} [update by jcouv:] Note that this boilerplate is no longer necessary in Preview 2 (ie. using preview2 versions of the compiler/VS and of Core). |
The code compiles but enumerating |
This is a compiler bug: dotnet/roslyn#31268 |
This is also manifesting itself in the following way: MSB6006 "csc.exe" exited with code -2146232797. AsyncStreams C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\15.0\Bin\Roslyn\Microsoft.CSharp.Core.targets 52 Just for reference. |
Sorry, I meant to add that comment to "31268" in the post above. |
from the visual studio blog:
I just wanted to say kudos for acknowledging the mistake and pointing to a clear workaround for the time being. |
I'm seeing: |
using .net core 3 3.0.100-preview-010184 sorted this |
Note that this boilerplate is no longer necessary in Preview 2 (ie. using preview2 versions of the compiler/VS and of Core |
I used .NET Core 3.0.0-preview-27122-01, win10-x64 (downloaded from dot.net) and tried to build this example application:
The build fails with the following errors:
Project file:
The text was updated successfully, but these errors were encountered: