-
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
Updating Microsoft.Windows.Compatibility to v3.0.0 Results in Build Errors #30996
Comments
Finally figured out how to reproduce the error. See here: https://github.com/nick-beer/GetAwaiterBug. Adding a using statement for 'System' was the step I had previously been missing. I suspect it has something to do with these extension methods? |
The real problem is the I'll dig a little bit more to see why this is happening, it seems like a facade might be broken, but still not sure. |
Ok, so I think the way to go here is to remove the However, this seems like a compiler bug because no-one is using those extension methods at all, if you compile it by including As a workaround add this package reference to your project: <PackageReference Include="System.Runtime.WindowsRuntime" Version="4.6.0" ExcludeAssets="all" /> @danmosemsft we would need to remove the reference to |
@safern does this need a 3.0 PR? |
Yes, I will port dotnet/corefx#41419 now |
@safern |
Closing as we removed S.R.WindowsRuntime* from the compat pack. The roslyn question/issue I will follow up with their team to see if there needs to happen something on their side. |
I recently update my Microsoft.Windows.Compatibility nuget from v3.0.0-preview5.19224.8 to v3.0.0. After updating, I'm not longer able to build. The build generates many errors similar to:
This error is repeated for
IAsyncAction
,IAsyncActionWithProgress<>
,IAsyncOperation<>
, andIAsyncOperationWithProgress<>
.The lines that are generating these errors are places that we are awaiting a custom object that contains a Task. That object has a
GetAwaiter
extension method that returns a TaskAwaiter - obtained from the contained Task.The project's in question have Sdk="Microsoft.NET.Sdk.WindowsDesktop", and UseWpf and UseWindowsForms set to 'true'.
I've tried reproducing these build errors in a smaller application, but I haven't had any luck yet. I'll keep trying to reproduce, but in the meantime, does anyone have any ideas?
The text was updated successfully, but these errors were encountered: