question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WinRT: Windows 8.1 SafeFireAndForget issue "No overload for method"

See original GitHub issue

Hello,

I noticed an error on my WinRT project (Windows 8.1) using your package. I can’t use the SafeFireAndForget extension method because I have this message : No overload for method 'SafeFireAndForget' takes 1 arguments

image

Do you have more information about this problem?

Thanks

Nuget package version : 4.1.0

Microsoft Visual Studio Enterprise 2015 Version 14.0.25431.01 Update 3 Microsoft .NET Framework Version 4.8.03752

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
brminnickcommented, Apr 1, 2020

The fix is now available in v4.1.1-pre1 🎉

@JeromeGsq When you get a chance, can you try out v4.1.1-pre1 and confirm it works for you?

NuGet: https://www.nuget.org/packages/AsyncAwaitBestPractices/4.1.1-pre1 GitHub Release: https://github.com/brminnick/AsyncAwaitBestPractices/releases/tag/v4.1.1-pre1

void FixedIn411Pre1()
{
    Run().SafeFireAndForget(ex => Debug.WriteLine(ex));
}

async Task Run()
{
    await Task.Delay(2000);
}
1reaction
brminnickcommented, Apr 1, 2020

Looks like Visual Studio 2015 requires you to create a variable for ref arguments.

Here’s a workaround:

void Workaround()
{
    Action<Exception> handleException = ex => Debug.WriteLine(ex);
    bool continueOnCapturedContext = false;

    Run().SafeFireAndForget<Exception>(ref handleException, ref continueOnCapturedContext);
}

async Task Run()
{
    await Task.Delay(2000);
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

C# Sockets ReceiveAsync No overload for method error
The error is: "No overload for method 'ReceiveAsync' takes '2' arguments." This confuses me because, on Microsoft's official documentation, they ...
Read more >
Error handling with C++/WinRT - UWP applications
This topic discusses strategies for handling errors when programming with C++/WinRT.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found