monke
monke
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
No problem at all, thank you for your help!
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
And in the API client library we add a header to all requests that say which platform the request is coming from, currently using the OperatingSystem.IsAndroid() method
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
Currently we have: - Legacy monolithic ASP.NET application (.NET Framework) - Legacy Xamarin app - New API (.NET 8) - New API client library (.NET 8) - New MAUI app < -- Uses the New API client library - New Blazor Web (.NET 8) < -- Uses the New API client library And would like to add the API Client library to the legacy application so we can start moving more parts of it to the new API
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
Yeah, let me try to give a better explanation
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
Ok so I think I understand from your explanation
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
I have been working with .NET Framework stuff since about 2020 and started migrating parts of this app to .NET in 2022, this is my first time trying to do anything with .NET Standard since I've never had to share code between them before
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
if android doesn't exist for .NET Standard 2.0, then why does it run fine on android? That seems a bit odd to me, for it to run there fine but not know about its existence?
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
Not sure what you mean by one level deeper, theres nothing to step into here
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
Yeah I looked in that repo to see what this class did, coped it and it doesn't work https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs#L201
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
The link you sent says to use OperatingSystem.IsAndroid(), which doesn't exist in .net standard
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
yeah I get that, not trying to do it in the framework app. Trying in .NET Standard
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
again, upgrading the legacy app from .NET framework is not possible
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
I think #if NET5_0_OR_GREATER would always be false at compile time, since its being built with standard 2.0
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
This legacy application was first written in 2000-somthing and started on Framework 2.0, its old and extremely fragile. Its slowly being replaced with a .NET 8 API, but it takes time
105 replies
CC#
Created by monke on 6/12/2024 in #help
`OperatingSystem.IsAndroid()` Alternative for .NET Standard 2.0
Thats not possible
105 replies