I am trying to create an add-in for Outlook and have problems with deserialization and antivirus program.
Ive noticed that when my add-in tried to deserialize any data, the .NET framework created a temporary dll in the folder "C:\Users\{UserName}\AppData\Local\Temp\".
This DLL existed for a very short time, but from time to time the antivirus blocked it and added an error message that file is used by another process.
Im tried to get rid of the temporary dll and found recommendations on using the sgen tool to create XmlSerializers.dll.
I created MyAssembly. XmlSerializers.dll with a strong name and placed it in the folder with the add-in (C: \ Program Files (x86) \ MyAddin). But that does not help.
Then I tried to post MyAssembly. XmlSerializers.dll in the GAC and then to the Outlook folder, but was not successful. When the dll is called from the GAC, I received the following error message, but the dll has no link.
"System.IO.FileNotFoundException: Failed to load the file or assembly or one of its dependencies. The system cannot find the specified file."
Please add any thoughts on how I can get rid of a temporary dll
P_rnd source
share