Maximus5 / conemu-inside

An example, how to embed http://conemu.github.io/ into another graphical application
57 stars 42 forks source link

async/await shim prevents usage with .NET >= 4.5 #20

Closed mastersign closed 8 years ago

mastersign commented 8 years ago

The shim types for async/await support in the Util folder create a conflict with the CLR types if ConEmu.WinForms is used in a project for .NET >= v4.5.

I only could get it working by defining an alias for the ConEmu.WinForms dependency (e.g. v40async) and then using its types with extern alias v40async and using v40async::ConEmu.WinForms. But this is quite a hack and tips off developers with less experience.

This problem shows itself through the compiler error CS4027 TaskAwaiter<...> does not implement INotifyCompletion.

hypersw commented 8 years ago

Interestingly, the testbed project is itself netfx 4.5.2, but it were only using method syntax for the stuff, not the async-await notation, so it closely missed the problem.

Could you check the current codebase that it's not giving any trouble anymore, yet still works with asyncs?

mastersign commented 8 years ago

With the utility classes set to internal, the problem is solved.