Pearl (asyncmeow)
Pearl (asyncmeow)
CC#
Created by Pearl (asyncmeow) on 1/22/2025 in #help
`dotnet tool` not installing tool from private Azure DevOps artifacts repo?
Hello! Not strictly C#-related, but I'm trying to use dotnet tool install [...] to install a tool available in a private NuGet repository. Specifically, I'm trying a command like this (with the Azure DevOps credential helper installed as well):
> dotnet tool install --interactive -g --source https://pkgs.dev.azure.com/[OrganizationName]/_packaging/Gemaire/nuget/v3/index.json AzTf
aztf is not found in NuGet feeds https://pkgs.dev.azure.com/Gemaire/_packaging/[OrganizationName]/nuget/v3/index.json.

>
> dotnet tool install --interactive -g --source https://pkgs.dev.azure.com/[OrganizationName]/_packaging/Gemaire/nuget/v3/index.json AzTf
aztf is not found in NuGet feeds https://pkgs.dev.azure.com/Gemaire/_packaging/[OrganizationName]/nuget/v3/index.json.

>
However, I'm 100% sure a package with the name AzTf exists in that feed. Any idea how I'd fix this? 😅
34 replies
CC#
Created by Pearl (asyncmeow) on 4/17/2024 in #help
IEnumerable<T> (or List<T>, or T[]) to IEnumerable (non-generic, ie. no type param)?
Hello, I'm working on some code that takes an object that may be either an object T itself, or some form of an IEnumerable<T>. The thing is, I don't actually know T in this context (as it's a asp.net IActionFilter). How would I check if that object is an IEnumerable and if it is, get the object as that IEnumerable to iterate over it?
2 replies
CC#
Created by Pearl (asyncmeow) on 9/20/2023 in #help
❔ Error in iOS MAUI app when trying to use WebAuthenticator
Hello! I'm trying to write a simple mobile app that hits my own API. I wrote a wrapper for the API that triggers a new authentication with WebAuthenticator.AuthenticateAsync if there's no valid authentication session. This works if I trigger a new auth session from a button, but trying to do an API request when a view loads (from OnAppearing) gives me this on iOS:
Foundation.NSErrorException: Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=3 "The UIWindowScene for the returned window was not in the foreground active state." UserInfo={NSDebugDescription=The UIWindowScene for the returned window was not in the foreground active state.}
at Microsoft.Maui.Authentication.WebAuthenticatorImplementation.AuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions)
at [...].Mobile.Services.AuthService.ForceAuthenticate() in [...]/Services/AuthService.cs:line 67
Foundation.NSErrorException: Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=3 "The UIWindowScene for the returned window was not in the foreground active state." UserInfo={NSDebugDescription=The UIWindowScene for the returned window was not in the foreground active state.}
at Microsoft.Maui.Authentication.WebAuthenticatorImplementation.AuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions)
at [...].Mobile.Services.AuthService.ForceAuthenticate() in [...]/Services/AuthService.cs:line 67
Is there a specific place I should be doing this in on view initialization in order to immediately pop up the login prompt (if needed) when a view is opened? (fwiw - if this is something that would normally get an app removed from the app store, it's not really an issue I care about - this is an app only for my personal use, and has other stuff that would probably get it removed anyway like using SSO but not having appleid support for SSO 😅 )
2 replies