-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
FileNotFoundException #4
Comments
Strange. I have tried to recreate this, but I can not find any scenario where I get that exception. If not, Try to recreate resources files.
This should work! |
Actually, looks like it might be a MAUI bug. dotnet/maui#7443 (comment) |
Oh, it sounds like your problem. Does it work if you disable the "Fast Deployment" setting? (I need to verify my sample project and see if I get it!) |
This is happening to me with this package in Windows 10 VS 2022 17.5.3. However, the same project compiles and works fine in MAC. The sample project also doesn't work in Windows but works in MAC. |
@arahmancsd , so to understand.
|
@SirJohnK thanks, In terms of exception, it is the same as stated in the question. I have no idea at the moment If I can have a release build with that exception, but can check that later. |
@arahmancsd , I am really trying, but I can not recreate this issue!
My setup:
|
@SirJohnK to give you a bit more detail. Here is an exception happening in the
My setup is; Windows 10 v22H2 b:19045.2965 |
@arahmancsd , this is really strange! Why does this work without any problem for me and most other users?
Hope it helps! |
@SirJohnK I have the latest VS and latest workloads. The release also crashes at startup in iOS, couldn't check it in Android yet. My project is XF upgraded to MAUI. |
@arahmancsd , do you still have the same issue with the sample project from this repo, built with VS2022 on Windows? |
@SirJohnK I am experiencing the same error attached earlier with the latest VS 2022 on Windows 10. |
@arahmancsd , can you clone or fork the library and test to add it to your solution and remove/comment out the verification row? resource.GetString(string.Empty); I added that row for file verification and maybe(!) sometimes the file is not accessible at that time. |
Disabling fast deploy does not work for me. |
@FrankVDL2471 , I would really like to get to the bottom of this! Unfortunately I have never been able to recreate this issue.
|
Johan,
When creating a new project it seems to be working fine.
So I'm also unable to reproduce the problem outside my project.
My build maching is a Windows 11
I'm targeting an Android 13 api level 33 on a Pixel 5 emulator.
Op ma 23 okt 2023 om 10:27 schreef Johan Svensson ***@***.***
…:
@FrankVDL2471 <https://github.com/FrankVDL2471> , I would really like to
get to the bottom of this! Unfortunately I have never been able to recreate
this issue.
- Can you build and run the sample project?
- and/or can you create and recreate this in a test project, that you
can share?
- What is your exact setup when getting this issue? (Build machine,
target OS, device/emulator/simulator, Langague settings etc)
—
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF3PKFC63VJIX5TR2DIPT5TYAYS6VAVCNFSM6AAAAAAUQVLAJCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZUGY3TSMBSGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@FrankVDL2471 , ok.
|
It seems the issue might be a bit bigger. I've removed all the resx files from my project , but still get the same error.
|
As additional info to @SirJohnK - we're facing the same issue in every localized (multi-project) solution. That issue is only happening to us, when deploying in DEBUG Mode to a physical device. When deploying to an emulator, without the setting public bool AddResource(ResourceManager resource)
{
try
{
//Verify access by attempting to get empty string
//resource.GetString(string.Empty);
//Access attempt was successful!
resources.Add(resource);
//Return successful status
return true;
}
catch (Exception)
{
//Access attempt was not successful!
return false;
}
} For debugging we copied the LocalizationResourceManager into our project. It looks, like it happens when resolving the resource in the ![]() Everything is there and loaded correctly, but under the hood, that exception is thrown. I've found a bunch of related Maui issues, but none of them gave us workaround for that. This one is the most likely related and merged to 7.0.1xx, but doesn't solve the problem. Currently we're on Maui 7.0.101. For us this is quite anoying, because we've to debug on a physical device for network related stuff, which isn't available on an emulator. |
Just started facing the same issue: |
We have just an English and a French, but in trying to use this project we're getting an exception:
This is the exception:
{System.IO.FileNotFoundException: File name: 'CabMdMobile.Maui.resources' at System.Reflection.Assembly.Load(AssemblyName assemblyRef, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext) at System.Reflection.RuntimeAssembly.InternalGetSatelliteAssembly(Assembly assembly, CultureInfo culture, Version version, Boolean throwOnFileNotFound)}
Not really sure why it's having a problem. The files are in the same place as your example, have the same name "AppResources", the settings for the files in the csproj seem to be the same as your sample as well.
The text was updated successfully, but these errors were encountered: