Skip to content
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

[Bug]: System.IO.FileNotFoundException:“Could not load file or assembly 'ReactiveUI.XamForms, Version=20.1.0.0, Culture=neutral, PublicKeyToken=null'. 系统找不到指定的文件。” #3926

Open
yangl1025 opened this issue Oct 17, 2024 · 1 comment
Labels

Comments

@yangl1025
Copy link

Describe the bug 🐞

.net 8 wpf ,ReactiveUI.WPF 20.1.63。windows desktop app, run err :
“scan.server.exe”(CoreCLR: clrhost): 已加载“C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\8.0.6\UIAutomationProvider.dll”。
引发的异常:“System.IO.FileNotFoundException”(位于 System.Private.CoreLib.dll 中)
引发的异常:“System.IO.FileNotFoundException”(位于 System.Private.CoreLib.dll 中)
引发的异常:“System.IO.FileNotFoundException”(位于 System.Private.CoreLib.dll 中)
引发的异常:“System.IO.FileNotFoundException”(位于 System.Private.CoreLib.dll 中)
引发的异常:“System.IO.FileNotFoundException”(位于 System.Private.CoreLib.dll 中)
引发的异常:“System.IO.FileNotFoundException”(位于 System.Private.CoreLib.dll 中)
引发的异常:“System.IO.FileNotFoundException”(位于 System.Private.CoreLib.dll 中)
引发的异常:“System.IO.FileNotFoundException”(位于 System.Private.CoreLib.dll 中)
引发的异常:“System.IO.FileNotFoundException”(位于 System.Private.CoreLib.dll 中)
1111

why ReactiveUI.XamForms? I not use this。

Step to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Reproduction repository

https://github.com/reactiveui/ReactiveUI

Expected behavior

This should happen...

Screenshots 🖼️

No response

IDE

No response

Operating system

No response

Version

No response

Device

No response

ReactiveUI Version

No response

Additional information ℹ️

No response

@yangl1025 yangl1025 added the bug label Oct 17, 2024
@dpvreony
Copy link
Member

dpvreony commented Oct 18, 2024

looks like same issue as #3786 (comment)


see if the following workaround prevents the issue. you need one of these in app initialisation before ReactiveUI is called.

if you're not doing any custom Splat DI config.

ReactiveUI.PlatformRegistrationManager.SetRegistrationNamespaces(RegistrationNamespace.WPF);

if you're doing any custom config to Splat etc. you'll need something along the lines of. (you might want this version anyway so it's clearer when ReactiveUI is being set up)

Locator.CurrentMutable.InitializeSplat();
Locator.CurrentMutable.InitializeReactiveUI(RegistrationNamespace.WPF); 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants