Hercules
Issues Updating Hybrid .NET MAUI Project from .NET 7 to .NET 8 with Xcode 16 and macOS Updates
I'm facing serious issues after updating my hybrid .NET MAUI project from .NET 7 to .NET 8. This project was started in 2021, and everything worked well under .NET 7. Recently, I updated the following:
.NET: Upgraded from .NET 7 to .NET 8.
macOS: Upgraded to the latest macOS version.
Xcode: Updated to Xcode 16.
Visual Studio: Now using Visual Studio 17.11.5, which is supposed to support Xcode 16.
Project Structure:
<Project Sdk="Microsoft.NET.Sdk.Razor"> for the MAUI app.
<Project Sdk="Microsoft.NET.Sdk.Razor"> for the Shared Library.
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> for the WASM app.
Issue:
I’m getting the following error for my iOS builds (in both Debug and Release modes):
This error points to the Xamarin.Shared.targets file at line 643.
Steps Taken:
* Verified that the Info.plist file exists and is not empty.
* Cleaned and rebuilt the solution.
* Enabled detailed build logs, but the error persists.
* Tried switching from Release to Debug mode, but the issue remains.
* I’m unable to run the iOS Simulator or debug the app when pairing with my MacBook Air.
* Checked project configurations for both Android and iOS, and they seem consistent.
I’m stuck and can't get past this error, making it impossible to debug or publish to TestFlight. Any suggestions or insights would be appreciated!
1 replies
AutoMapper: Ignoring Nested Property in Mapping Configuration Results in Null Value
I'm encountering an issue with AutoMapper where I'm trying to ignore a nested property during mapping, but it's still being set to null in the destination object. Here's my setup:
I have two classes, CompanyUpdateRequest and ApiUpdateRequest, where ApiUpdateRequestcontains a nested property ApiKey:
However, when I map from CompanyUpdateRequest to Company, the ApiKey property within the Api objects ends up being null, even though it's not present in the source object (ApiUpdateRequest).
I'm puzzled as to why this is happening. Is there a limitation in AutoMapper that prevents ignoring properties within nested entities, or am I missing something in my configuration?
5 replies
Trouble Including staticwebassets.build.json from Shared Project in .NET MAUI Blazor Hybrid App
I'm facing an issue with including the staticwebassets.build.json file from a shared class library project (HikaridoConnect.Shared) in the publish output of my .NET MAUI Blazor hybrid app (HikaridoConnect.NativeClients). Despite setting the "Copy to Output Directory" property and ensuring proper project references, the file isn't included in the published output, causing functionality issues.
Question:
How can I ensure that the staticwebassets.build.json file from the shared project is correctly included in the publish output of my .NET MAUI Blazor hybrid app?
Are there any specific configurations or settings I might be overlooking?
I'd appreciate any insights or guidance on resolving this issue. Thanks in advance for your help!
1 replies
✅ Seeking Help with Blazor WebAssembly Deployment Issue
Hello,
I'm facing an issue with deploying my Blazor WebAssembly (WASM) app to Azure. The problem is that the deployed website doesn't reflect my code changes. Here are the details:
Issue:
* Blazor WebAssembly app deployed to Azure Web App.
* Deployment process runs without errors.
* Website shows an older version of the app, not reflecting recent code changes.
Additional Info:
*GitHub Actions workflow is used for building and publishing.
*Azure App Service Publish Profile is correctly set as a GitHub secret.
* Project includes shared components from other libraries.
Request for Help:
I need assistance in diagnosing and fixing this issue. If you've encountered a similar problem or have tips for troubleshooting Blazor WebAssembly deployments on Azure, please share your expertise.
Thank you for your help!
4 replies
❔ Blazor WebAssembly: How to dynamically hide a layout component after logging out
Question:
I have a Blazor WebAssembly application where I'm using the MudBlazor library to create a layout that includes a navigation bar (MudAppBar). I want to dynamically hide this navigation bar after a user logs out of the application.
Here's the relevant part of my layout:
I'm triggering the logout process using the following code:
Inside my Logout method, I'm using NotifyAuthenticationStateChanged to reset the authentication state and set it to an empty ClaimsPrincipal.
However, after navigating to the login page (/login), the navigation bar (MudAppBar) is still visible. It seems that the main layout is rendered when _navigationManager.NavigateTo("/login") is invoked.
How can I ensure that the navigation bar is hidden after a user logs out and navigates to the login page? Is there a way to dynamically update the layout based on the authentication state without requiring a hard refresh of the page?
I appreciate any insights or suggestions to resolve this issue.
Here is my custom AuthenticationStateProvider - how i user NotifyAuthenticationStateChanged - -> check the Logout() method.
https://paste.mod.gg/kvvtgasbzsxo/0
2 replies
❔ Troubleshooting JSON Mapping for POST Request to UserAsync Endpoint
I'm seeking guidance on formatting the JSON body for a POST request to the following API endpoint:
API Signature:
csharp
JSON Body (inputData):
The issue I'm encountering is that "userName": "AM" is being incorrectly mapped to HikariUser projectUser.Username, when it should be filling the *exampleProjectUser *field. Additionally, the other properties of HikariUser are not being correctly populated and are showing as null.
I've already tried using [JsonPropertyName("")] attributes without success. Any guidance or solutions to ensure the correct mapping of JSON properties to the method parameters would be greatly appreciated.
5 replies
❔ I need help making my code threadsafe that uses Selenium webdriver.
I am currently working on a service worker where i user selenium to take screenshots and the process for taking the screenshots is a multthreaded solutions where i use a Parallel.ForEach- loop with 4 or more threads on each round in the loops.
in the loops i am createing a chrome driver and a ChromeDriverService for the driver.
The service worker is installed as a windows service and it generates the following error after sometime after running perfectly fine.
I need help stabilizing the code.
8 replies
❔ I have this serviceWorker running Selenium for screenshots and its not working properly.
I need help identifying my problem and i have reasons to believe there is a leak somewhere in the code. Since the windows service is still running all night but not giving back any logs (using serilog) after sometime.
I have handled the my exceptions that I want to keep pushing for a screenshot.
But I believe in the longer run the selenium webdriver clashes with the ports.
I've tried to handle the ports by using an ConcurrentDictionary and giving every instance of webdriver its own port.
But i have zero understanding why my logs stops becuase i have nothing from the event viewer or any output.
The code is in the link since its to long to share.
https://codeshare.io/QneYzm
2 replies
❔ Getting started with windows service - onStart won't work. I am using VS 22.
I have this sample code trying to print to my event viewer. But this won't hit Onstart or give me the right sources in eventView its still "service1" as by default.
https://codeshare.io/dw8mzK
2 replies
❔ Do I need to take any extra steps to install a Windows service with Parallel.ForEach?
Is there any additional step required to install a Windows service when utilizing Parallel.ForEach, as I am encountering difficulties during the installation process?
My code used to work perfectly fine before when i used async but I later noticed I needed to use multiple threads to achive better performance. So I did some updates.
The new code look like this https://pastebin.com/hvntiY5U and when I deploy sc.exe create $serviceName binpath= $servicePath start= auto The Event Viewer returns:
"A timeout was reached (30000 milliseconds) while waiting for the ElicitStampenScreenshots-test service to connect."
"The myService service failed to start due to the following error: The service did not respond to the start or control request in a timely fashion."
Is there any abnormality with my code that creates a timeout or breaks the start process?
44 replies
✅ What other prerequisites are necessary to run service worker as a service on a Windows Server?
I have developed a service worker using .NET 7, and it successfully runs when tested through dotnet build. However, when attempting to publish the code and run it as a Windows service in the background, I consistently encounter Error 1053. I am utilizing Selenium webdriver to extract data, and I have installed the latest drivers and Chrome on the server. Despite this, I continue to receive Error 1053 and require assistance in deploying the service. I am unsure of what I am missing or what mistake I may be making.
Is it possible that the server is not recognizing the driver, resulting in a timeout during startup?
Code can be found here: https://pastebin.com/dAjhfK0i
1 replies
❔ I am need of help before I give up and run my code on a server instead of a serverless solution.
I have create an azure function locally and i've used the selenuim webdriver package for taking screenshots and automate logins on certains urls, And the client wished it to be serveless but my gut feeling said that it might nog be possible.
I wrote the code and now after i did some i found this information on google
"The base Azure Function image does not contain the necessary chromium packages to run selenium webdriver. [...] "and when I try to deploy the code to azure function app I get an error and it doesn't say much in the output field and in the message. Fellow develoeprs do we have any ideas on how to make an azure function app know of chromium?
2 replies