-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Adding resx file for additional language gives an error while trying to build iOS project #6076
Comments
This "self explaining" error message did cost me quite some time.
|
After adding that I get the following error:
|
Same behaviour for Debug and Release build? |
Where exactly are you adding the resx file? I haven't seen this behavior in my .NET MAUI Blazor app. Could you maybe go through the reproduction steps to create a sample project and put that on GitHub for us to look at? That would be a great help! :) |
Maybe i can step in and add some infos. In the app, i am working on, i use a large domain model which currently consists of 50 projects and fast growing. Some of them do have their own embedded translations in addition to the translations in the client (Maui) app. Example project structure:
Having had the same error message , after quite some research and time, i found and added
to the Maui App project file. It fixed this specific problem. Is this scenario totally unusal? I wish, there would be a more complex (or realistic?) app public available (i.e. via Testflight), for integration testing, before each new Maui release. Maybe with topics like (from my own experience):
I, and i think other people also, would be more than happy, to test each version and give feedback. |
I was able to get it to build by adding Also, localization seems to be working on Android, but not iOS. Will need to do further testing to verify. Here's the repo: |
Verified not repro on iOS 15.4. Not repro project: |
hey guys ! this error happen when you put your *.resx file diferent folder from Resources |
if i remove *.resx files this issue will dissapear |
Any news @Redth @jfversluis? |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Hey everyone! I just had a quick look at this and with the latest versions I don't seem to be able to reproduce the build error anymore. It all builds find for me (also using the reproduction linked in this issue), however, unfortunately, the localization doesn't seem to work on iOS. I think that is due to a (already fixed) bug in the runtime, I'm asking around about that now. Can someone confirm that the build error is gone? |
Hi @trevortirrell. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
As for the localization not working, see my write-up here: #7362 (comment) |
Hi @jfversluis Thanks so much for the quick response! The AL1012 is gone using the latest version of MAUI and by adding this into the csproj file
Now as you mention there is a issue with the localization not working AndroidWindowsiPhone (Not working)you suggest to have the global.json to a lower version, this will make not compiling again, right? |
With the global.json on a lower version it both compiled and the localization worked for me :) I did not need the |
Hi @trevortirrell. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Hi @jfversluis then I´ve followed your instructions:
I still was not able to build the app without the
Still the issue with the language: I´m using the repo: https://github.com/Rabosa616/MauiMultilanguageApp To clean up my local repo I use this ps: Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse } |
@Rabosa616 your |
You can read how to localize .NET MAUI application here: https://vladislavantonyuk.azurewebsites.net/articles/Localize-.NET-MAUI-application |
First of all thanks @jfversluis for your correction on my test repo. Inspecting the output at the C:\Users\vaos\AppData\Local\Temp\Xamarin\HotRestart\Signing\MauiApp1.app\out\Payload\MauiApp1.app\MauiApp1.content I do see MauiApp1.dll, opening it with the Jetbrains dotPeek I can only see the english resource but not the spanish one If I create a Xamarin app with multilingual support in the same temp folder I see the language folders: Inside of the ES folder I can see: The difference is that on Xamarin I can see the Language folders with the resource dll´s and on maui there is no language folder generated. May be there is something on my machine´s configuration? |
Thanks for your article, I´ve checked your source code in github and I´ve notice that your are creating a Window application. Using Maui on Windows and Android Works fine but when you build the app for iOS it´s not working. |
it works on iOS Screen.Recording.2022-08-30.at.19.21.47.mov |
After reviewing the artifacts that are produced by my repo https://github.com/Rabosa616/MauiMultilanguageApp/actions/runs/2887616872 , I do see that the iOS one has the spanish resources. When I try to compile on my windows developer machine does not produce it. I´m wondering if is a machine configuration or a bug in Visual Studio 2022 on windows machine not connected to any mac @VladislavAntonyuk are you compiling with a Visual studio on a Windows machine paired with a Mac or without? |
Duplicate of #5595 |
Description
When I add a second language resource file (i.e. AppResources.es.resx) I can no longer build the iOS project. If I remove it from the project then it builds and deploys just fine.
Steps to Reproduce
Version with bug
Release Candidate 1 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iOS 15
Did you find any workaround?
Remove all resx files other than the default from the project
Relevant log output
The text was updated successfully, but these errors were encountered: