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

[BUG] Ambiguous reference between ‘Plugin.BLE.Abstractions.Trace’ and ‘System.Diagnostics.Trace’ #1204

Closed
RolfNoot opened this issue Jun 14, 2024 · 3 comments
Assignees
Labels
area-hotreload Issues with Hot Reload experiences area-maui bug Something isn't working fixed-pending-release

Comments

@RolfNoot
Copy link

Describe the Issue

Version 1.0.6

I got an error when working with Plugin.BLE as HotReloadMobileTapInitializer uses System.Diagnostics.Trace which is an ambiguous to Plugin.BLE.Abstractions.Trace

/Users/rolf/Downloads/MauiXAMLBluetoothLE/MauiXAMLBluetoothLE/Microsoft.VisualStudio.HotReload.MobileTapInitializer/Microsoft.VisualStudio.HotReload.MobileTapInitializer.ModuleInitializerGenerator/HotReloadMobileTapInitializer.g.cs(17,45): error CS0104: ‘Trace’ is an ambiguous reference between ‘Plugin.BLE.Abstractions.Trace’ and ‘System.Diagnostics.Trace’ [/Users/rolf/Downloads/MauiXAMLBluetoothLE/MauiXAMLBluetoothLE/MauiXAMLBluetoothLE.csproj::TargetFramework=net8.0-ios]

The file HotReloadMobileTapInitializer.g.cs is also not available at that location and I cannot find it.

Steps To Reproduce

No response

Expected Behavior

No response

Environment Information

Version: 1.90.1 (Universal)
Commit: 611f9bfce64f25108829dd295f54a6894e87339d
Date: 2024-06-11T21:02:41.372Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Darwin x64 23.2.0

@RolfNoot RolfNoot added the bug Something isn't working label Jun 14, 2024
@webreidi webreidi added area-maui area-hotreload Issues with Hot Reload experiences labels Jun 17, 2024
@BretJohnson
Copy link
Member

@RolfNoot - Thanks for writing up this bug. I assume the workaround here https://devblogs.microsoft.com/dotnet/the-dotnet-maui-extension-for-visual-studio-code-is-now-generally-available/#coment-20909 worked for you - but let me know if it didn't.

@RolfNoot
Copy link
Author

Thank you for the reply. Yes I added 'global using'. Changed 'global using Plugin.BLE.Abstractions.Trace' to using 'Plugin.BLE.Abstractions.Trace' and it works fine now!

@BretJohnson
Copy link
Member

This should be fixed now, in C# extension 2.36.19 and later.
If after updating the C# extension you still see this problem, please let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-hotreload Issues with Hot Reload experiences area-maui bug Something isn't working fixed-pending-release
Projects
None yet
Development

No branches or pull requests

3 participants