videokit-ai / videokit

Low-code, cross-platform media SDK for Unity Engine. Register at https://videokit.ai
https://videokit.ai
Apache License 2.0
107 stars 14 forks source link

Compiler errors when updating Function package to version 0.0.7 for VideoKit version 0.0.18-alpha.4 in Unity version 2022.3.16f1 #102

Closed thesanketkale closed 9 months ago

thesanketkale commented 9 months ago

Hi @olokobayusuf,

I am seeing compiler errors in our project after upgrading to VideoKit version 0.0.18-alpha-4 and Function version 0.0.7.

image

The error logs are below:

Library\PackageCache\ai.fxn.fxn3d@0.0.7\Runtime\API\DotNetClient.cs(103,22): error CS0433: The type 'IAsyncEnumerable' exists in both 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Library\PackageCache\ai.fxn.fxn3d@0.0.7\Runtime\API\IFunctionClient.cs(54,9): error CS0433: The type 'IAsyncEnumerable' exists in both 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Library\PackageCache\ai.fxn.fxn3d@0.0.7\Runtime\Unity\AsyncEnumerableQueue.cs(35,22): error CS0433: The type 'IAsyncEnumerable' exists in both 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Library\PackageCache\ai.fxn.fxn3d@0.0.7\Runtime\Unity\AsyncEnumerableQueue.cs(36,14): error CS0433: The type 'EnumeratorCancellationAttribute' exists in both 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Library\PackageCache\ai.fxn.fxn3d@0.0.7\Runtime\Unity\DownloadHandlerAsyncIterable.cs(23,16): error CS0433: The type 'IAsyncEnumerable' exists in both 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Library\PackageCache\ai.fxn.fxn3d@0.0.7\Runtime\Services\Prediction.cs(99,22):` error CS0433: The type 'IAsyncEnumerable' exists in both 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Library\PackageCache\ai.fxn.fxn3d@0.0.7\Runtime\Unity\UnityClient.cs(110,22): error CS0433: The type 'IAsyncEnumerable' exists in both 'Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

My project setup is:

olokobayusuf commented 9 months ago

Hey @thesanketkale do you have other dependencies in your project that cause this clash? I can't repro.

thesanketkale commented 9 months ago

Yes, I have dlls for AWS S3 assemblies which seem to be causing the conflict. The "Microsoft.Bcl.AsyncInterfaces.dll" in AWS assemblies conflicts with the mscorlib of Function plugin.

What can be done in this case to fix it?

olokobayusuf commented 9 months ago

@thesanketkale I'm not too sure because Function doesn't include any of the conflicting classes. The error seems to stem from the fact that because Function is referring to these classes, the compiler can't resolve which duplicate to use. You can try removing the Microsoft.Bcl.AsyncInterfaces.dll referenced and see if that removes the error.

olokobayusuf commented 9 months ago

@thesanketkale I'm closing this for inactivity, and because it technically isn't a VideoKit bug.