You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Core] AsReadOnly<T> conflicts with System.Collections.Generic.CollectionExtensions #2225
Note this extension does not come from Uno Extensions, but from Uno.Core package
When Uno Extensions are included in an app, the Uno.Core AsReadOnly extension will conflict with the .NET built-in one, as Uno Extensions adds global using for Uno.Extensions namespace, so both are included by default when the user uses Uno Extensions, so AsReadOnly is essentially unusable as an extension method.
I think it may be just better to keep this one internal only or remove it altogether.
Uno.Core does not provide this particular extension, it is a sub-package that provides it. If need be, the dependency should be decomposed to avoid using that particular sub-package that provides this extension.
changed the title [-]`AsReadOnly<T>` conflicts with `System.Collections.Generic.CollectionExtensions`[/-][+][Core] `AsReadOnly<T>` conflicts with `System.Collections.Generic.CollectionExtensions`[/+]on May 7, 2024
No change has been done for this. The only way to change this is to ensure that uno.extensions does not rely on uno.core, but only the required sub packages.
unoplatform/Uno.Core#90 will be updating to net7.0 instead of net5.0/net6.0, and AsReadOnly will not be included for net7.0 (it will be kept for netstandard2.0 and uap though)
Activity
jeromelaban commentedon Apr 1, 2024
Uno.Core does not provide this particular extension, it is a sub-package that provides it. If need be, the dependency should be decomposed to avoid using that particular sub-package that provides this extension.
nickrandolph commentedon May 7, 2024
@MartinZikmund / @jeromelaban has anything been done about this?
MartinZikmund commentedon May 7, 2024
@nickrandolph not yet, not sure if this would be a breaking change that we can safely do?
[-]`AsReadOnly<T>` conflicts with `System.Collections.Generic.CollectionExtensions`[/-][+][Core] `AsReadOnly<T>` conflicts with `System.Collections.Generic.CollectionExtensions`[/+]jeromelaban commentedon May 7, 2024
No change has been done for this. The only way to change this is to ensure that uno.extensions does not rely on uno.core, but only the required sub packages.
Youssef1313 commentedon Jun 11, 2024
I think no matter what we do, there has to be a binary break here, but hopefully not major.
Youssef1313 commentedon Jun 11, 2024
unoplatform/Uno.Core#90 will be updating to net7.0 instead of net5.0/net6.0, and
AsReadOnlywill not be included for net7.0 (it will be kept for netstandard2.0 and uap though)jeromelaban commentedon Jun 14, 2024
Uno.Core 4.1.1 is in the dev feed. @nickrandolph it would be interesting to avoid depending on Uno.Core directly, and use the subpackages that are only required by the extensions package that uses it. (list of packages https://github.com/unoplatform/Uno.Core#unocore)