Skip to content
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

Compilation error if to use it together with plugin for "oidc-client" (needed for Azure auth) #433

Closed
IvanMurzak opened this issue Apr 20, 2024 · 9 comments

Comments

@IvanMurzak
Copy link

IvanMurzak commented Apr 20, 2024

That is the conflict with Microsoft.Bcl.AsyncInterfaces.dll, which is part of the Oidc-Client.

Library\PackageCache\com.timcassell.protopromise@3.0.2\Core\Cancelations\CancelationRegistration.cs(117,46): error CS0433: The type 'IAsyncDisposable' exists in both 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Unity version 2022.3.11.

Is there any way to avoid the conflict? I can't disable/remove the DLL because the plugin needs other classes from it.
PhotoPromise looks very impressive, I would like to try it if only it could life together with that dll.

image

@timcassell
Copy link
Owner

@IvanMurzak What types from that dll are not included in .Net Standard 2.1? ProtoPromise uses the types from the standard BCL. Typically libraries like that that have types from the BCL automatically work in non-Unity, so it might be a Unity-specific bug.

@timcassell
Copy link
Owner

@IvanMurzak I assume you are trying to use this with https://www.nuget.org/packages/IdentityModel.OidcClient? I tried with Unity 2022.3.21 using https://github.com/GlitchEnzo/NuGetForUnity, and I didn't see any errors. Maybe you need to update your Unity version?

@IvanMurzak
Copy link
Author

IvanMurzak commented Apr 24, 2024

@IvanMurzak What types from that dll are not included in .Net Standard 2.1? ProtoPromise uses the types from the standard BCL. Typically libraries like that that have types from the BCL automatically work in non-Unity, so it might be a Unity-specific bug.

The project I am working on has .NET Framework 4.x. Is the .NET Standard 2.1 required to use ProtoPromise ?

@timcassell
Copy link
Owner

The project I am working on has .NET Framework 4.x. Is the .NET Standard 2.1 required to use PhotoPromise ?

Unity's 4.X API compatibility level includes .Net Standard 2.1 APIs (unlike desktop Framework). So, no, netstandard2.1 API compatibility level is not required to use ProtoPromise, but you may need to update your Unity version to get it to work (have you tried that yet?).

@IvanMurzak
Copy link
Author

The project I am working on has .NET Framework 4.x. Is the .NET Standard 2.1 required to use ProtoPromise ?

Unity's 4.X API compatibility level includes .Net Standard 2.1 APIs (unlike desktop Framework). So, no, netstandard2.1 API compatibility level is not required to use ProtoPromise, but you may need to update your Unity version to get it to work (have you tried that yet?).

Sorry, that is too risky to update Unity version. I won't do that. I can just try to do that with a copy of the project just to let you know if that works. But it won't be a solution for me.

@timcassell
Copy link
Owner

timcassell commented Apr 24, 2024

@IvanMurzak I tried again using Unity 2022.3.11, with .Net Framework API compatibility level. I'm not seeing any errors with only OidcClient and ProtoPromise installed. Are you able to repro in a separate project with just those 2 libraries? Maybe something else is causing the issue. If so, can you share the steps you are using to install the libraries?

@IvanMurzak
Copy link
Author

Just tried to update Unity for 2022.3.25. Still have all the errors.

image

@IvanMurzak
Copy link
Author

@IvanMurzak I tried again using Unity 2022.3.11, with .Net Framework API compatibility level. I'm not seeing any errors with only OidcClient and ProtoPromise installed. Are you able to repro in a separate project with just those 2 libraries? Maybe something else is causing the issue. If so, can you share the steps you are using to install the libraries?

I will try to reinstall OidcClient. I will reply later

@timcassell
Copy link
Owner

Closing for no repro. I also think it's not an issue with this library.

@timcassell timcassell closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants