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

AutoUpdater.NET.XmlSerializers.dll not found #636

Open
GamerClassN7 opened this issue Aug 9, 2023 · 7 comments
Open

AutoUpdater.NET.XmlSerializers.dll not found #636

GamerClassN7 opened this issue Aug 9, 2023 · 7 comments

Comments

@GamerClassN7
Copy link

GamerClassN7 commented Aug 9, 2023

Hello,
i am getting to debug console this error AutoUpdater.NET.XmlSerializers.dll

File name: 'AutoUpdater.NET.XmlSerializers, Version=1.8.3.0, Culture=neutral, PublicKeyToken=501435c91b35f4bc, processorArchitecture=MSIL' at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly) [08.08.2023-22:06:02][3][HA]System.IO.FileNotFoundException: File name: 'C:\Users\JonatanRek\Downloads\HA_Self_Contained (2)\AutoUpdater.NET.XmlSerializers.dll' at System.Runtime.Loader.AssemblyLoadContext.LoadFromPath(IntPtr ptrNativeAssemblyLoadContext, String ilPath, String niPath, ObjectHandleOnStack retAssembly)

Can anybody help me resolve the issue ?

Thank you in advance for any answer :)

@ravibpatel
Copy link
Owner

Which .NET version are you using? Are you creating a self-contained executable?

@GamerClassN7
Copy link
Author

Yes i am using self-contained also since i use UWM Notification "toats" i am stuck to this version "net6.0-windows10.0.17763.0"

@GamerClassN7
Copy link
Author

any update how to fix the issue since everything's woks normaul it just spam the log

@ravibpatel
Copy link
Owner

Can you try turning on "Just my code" in your project as shown here?

@GamerClassN7
Copy link
Author

Hello already done
image
still same

@AlessandroMenchiniTmaxLab

https://stackoverflow.com/questions/1127431/xmlserializer-giving-filenotfoundexception-at-constructor

@Kurpanik
Copy link

The important part from the Stackoverflow link above:

[..] this is normal behavior. The constructor of the XmlSerializer first tries to find an assembly named [YourAssembly].XmlSerializers.dll which should contain the generated class for serialization of your type. Since such a DLL has not been generated yet (they are not by default), a FileNotFoundException is thrown. When that happenes, XmlSerializer's constructor catches that exception, and the DLL is generated automatically at runtime by the XmlSerializer's constructor (this is done by generating C# source files in the %temp% directory of your computer, then compiling them using the C# compiler). Additional constructions of an XmlSerializer for the same type will just use the already generated DLL.

The exception is handled by XmlSerializer's constructor. There is no need to do anything yourself, you can just click 'Continue' (F5) to continue executing your program and everything will be fine. If you're bothered by the exceptions stopping the execution of your program and popping up an exception helper, you either have 'Just My Code' turned off, or you have the FileNotFoundException set to break execution when thrown, instead of when 'User-unhandled'

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

No branches or pull requests

4 participants