The type forwarder for type 'Windows.Foundation.IAsyncOperation`1' in assembly 'Windows' causes a cycle
See original GitHub issueI’d like to use await with IAsyncOperation. after I added
c:\Program Files (x86)\Windows Kits\10\UnionMetadata\Facade\Windows.WinMD
c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\System.Runtime.WindowsRuntime.dll
I got:
The type forwarder for type 'Windows.Foundation.IAsyncOperation`1' in assembly 'Windows' causes a cycle
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:15
Top Results From Across the Web
"Type forwarded to assembly 'Windows version=255.255. ...
The error says: The type forwarder for 'Windows.System.UserProfile.LockScreen' in assembly 'Windows' causes a cycle. The type name 'LockScreen ...
Read more >Console App (Non UWP) with CS/WinRT
I was able to access WinRT API like Windows. ... CS0012: The type 'IAsyncOperation<>' is defined in an assembly that is not referenced....
Read more >Suddenly unable to build solutions anymore.
WSAAsync.Internal.cs(7,33): error CS0731: The type forwarder for type 'Windows.Storage.StorageFolder' in assembly 'Windows' causes a cycle
Read more >WinRT/UWP Bluetooth APIs returning [System. ...
Hey all, I'm trying to leverage the WinRT Bluetooth Low Energy (BLE)/ Generic Attribute Profile (GATT/GAP) APIs in PowerShell for a project ...
Read more >The type 'IAsyncAction' is defined in an assembly that is not ...
The type 'IAsyncAction' is defined in an assembly that is not referenced. You must add a reference to assembly 'Windows, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JamesEarle @bao-qian the instructions in this repo and on the nuget site are wrong. You do not manually add the facade for the API you need. This is what causes the circular reference.
You simply add the full Windows.winmd at
C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0\Windows.winmd
andSystem.Runtime.WindowsRuntime
. That’s it. Note when I say “full”, I mean the.winmd
file should be a few megabytes. There’s plenty of them with the same name sprinkled around that are a few kb and it’s easy to screw up and select one of these.Then, wherever you call
await
on anIAsyncOperation
, make sure you haveusing System;
in the same source file.Hope this helps people.
This issue is currently crushing my hopes and dreams.