Closed StephenCleary closed 9 years ago
I was unable to reproduce this issue with the steps provided on Re# 9.1.1.
If creating a .NET 4.5 Console app, then there are no references to System.Runtime.
If creating a .NET 4.0 Console app, then a reference to System.Runtime is created for you.
Since the example code uses Task.Delay
, I believe it is a .NET 4.5 console app that somehow has the .NET 4.0 version of AsyncEx references. This can happen if you install AsyncEx into a .NET 4.0 console app and then change the target framework to .NET 4.5. In general, NuGet packages do not work correctly when changing frameworks; the correct procedure is to uninstall all NuGet packages, change the target framework, and then re-install them all.
Migrated from CodePlex
Steps:
PM> Install-Package Nito.AsyncEx -Version 3.0.0
Resharper complains about System.Runtime, but actually code runs fine unless you let resharper add that reference to runtime, then it fails to build. Interestingly, suspending and resuming resharper then does not show error.
Understand if you regard this as resharper bug, but thought that adding reference to System.Runtime 4.0.0.0 should not stop compilation with your nuget package.