How to Fix VSTO Add-In Blocked by Microsoft Defender ASR Rules
Question details
Users or developers are unable to run a signed VSTO add-in because it is being blocked by Microsoft Defender Attack Surface Reduction rules.

- Product
- Microsoft Office VSTO Add-ins
- Device & OS
- Windows
- Scenario
- Launching a signed VSTO add-in deployed via ClickOnce from a randomly named temporary deployment folder.
- Observed behavior
- The add-in fails to execute as it gets intercepted and blocked by Defender ASR policies, despite having an Extended Validation (EV) certificate.
Ensure you have administrative privileges or access to your IT security team, as modifying Microsoft Defender ASR rules requires elevated system permissions.
Create a Scoped Allow Rule in Microsoft Defender
Work with your security administrator to whitelist the specific publisher or process without compromising the organization's overall security.
Because ClickOnce deployments use randomly named temporary folders, ASR rules often flag the execution as suspicious. Instead of disabling the security policy, you should create a highly specific exclusion.
Open the Microsoft Defender Security Center and review the recent ASR block events to identify the specific executable and rule ID blocking the VSTO add-in.
Create a narrowly scoped allow rule based on the certificate publisher, specific file hash, or the trusted parent process.
Apply the new rule to the affected user group and attempt to launch the add-in again to confirm it runs successfully under the updated security policy.

Consult Microsoft Q&A for Developer Support
If you are the developer of the VSTO add-in, seek specialized .NET and C# deployment assistance.
Try WPS Office for a Streamlined Experience
If managing complex VSTO deployments and navigating Microsoft Defender security conflicts is slowing your team down, consider switching to WPS Office. It provides a lightweight, secure, and highly compatible productivity suite without the overhead of complex add-in deployment architectures.

Frequently Asked Questions
Why does Defender block my add-in even with an EV certificate?
Microsoft Defender ASR rules evaluate the behavior and execution context (such as running from a random temporary folder via ClickOnce) rather than just the certificate's validity, which can trigger a block regardless of EV status.
Should I disable ASR rules to make the add-in work?
No, disabling ASR rules weakens your system's defense against malware and ransomware. Instead, use targeted exclusions based on the publisher or file hash.
Can I just exclude the ClickOnce deployment folder?
It is highly discouraged. Because ClickOnce uses randomly named temporary folders in the user profile, excluding broad wildcard paths can inadvertently allow malicious executables to run undetected in those directories.
Does WPS Office support VSTO add-ins?
WPS Office does not natively support Microsoft's VSTO (Visual Studio Tools for Office) framework, but it offers robust support for VBA macros, COM add-ins, and its own API for custom automation tasks.




