Word and Excel VSTO-AddIns are loading very slowly because DLLs are scanned by Windows Defender

M. Rapp 0 Reputation points
2023-05-03T05:51:41.33+00:00

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: [Analyzer Result

](https://i.stack.imgur.com/jXPHE.png)

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.

Thanks!

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,916 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.