So far we experienced this issue on different Windows Server 2016 Standard x64 systems (we use it as a terminal server) and the problem seems to exist since January/February 2023. The customers use MS Office 2016 32 Bit.
Loading VSTO AddIns when Word or Excel is started takes such a long time especially when they have a lot of dependent DLLs (up to 40 seconds).
By using Performance Analyzer I found out that this is occurs because the Microsoft Windows Defender scans all the DLLs under %LOCALAPPDATA/assembly/tmp on startup of Word/Excel.
Here a short extract of the analyzer result: [
I know the VSTO DLLs are shadow copied in a subfolder of %LOCALAPPDATA%\assembly\dl3. The exact path is defnied in the registry under Computer\HKEY_CURRENT_USER\Software\Microsoft\Fusion\DownloadCacheLocation.
But the DLLs that are scanned by the defender are located under %LOCALAPPDATA%\assembly\tmp. And these DLLs are copied in there only for a short amount of time during startup of Word/Excel. When program has been started they disappeared.
So currently the only way to workaround this is to exclude the winword.exe and excel.exe process in the windows defender. Which is no acceptable solution.
I think the root problem is that the DLLs are copied to this tmp folder I mentioned above for no obvious reason. If they were not copied no scan would be done.
On my Windows 11 MS Office 2021 Plus system the tmp folder seems not to be used.
Do you know if there is a special setting or a reg key where I can turn off copying to the tmp folder? Or maybe you can advice me a total different solution for this issue.