The error is an Application Control enforcement block, not a VS Code, PowerShell, GCC, or file-association failure. Creating a Developer Drive doesn’t automatically create an App Control exception for executables compiled on that drive.
First, identify which policy is blocking the executable:
- Open Event Viewer.
- Navigate to Applications and Services Logs > Microsoft > Windows > CodeIntegrity > Operational.
- Rebuild and run the program until the block occurs.
- Find the corresponding events:
- 3077 - an enforced App Control policy blocked the executable.
- 3089 - signature information associated with the blocked file.
- 3099 - identifies a successfully loaded App Control policy.
Record the PolicyName, PolicyId, File Name, Process Name, and signing information.
You can also list the App Control policies from an elevated terminal:
CiTool.exe --list-policies
CiTool is included in Windows 11 version 22H2 and later. Do not remove a policy until you know whether it belongs to Windows, Smart App Control, or an organization managing the device.
If Smart App Control is responsible
Check Windows Security > App & browser control > Smart App Control settings. Smart App Control can block newly compiled, unsigned executables when Microsoft’s reputation service can’t confidently classify them as safe. Microsoft doesn’t provide per-application exceptions for Smart App Control. The supported options are to sign the executable with a valid trusted certificate or turn off Smart App Control. Turning it off reduces protection against unknown or unsigned applications.
For repeatedly rebuilt local development binaries, signing each production version may be appropriate, but Microsoft doesn’t document a Smart App Control exception specifically for temporary GCC build output.
If an App Control for Business policy is responsible
If Event 3077 identifies an organizational policy or Windows reports that an organization manages settings, the policy administrator must review the 3077/3089 events and add an appropriate allow rule or supplemental policy. App Control rules can use signer, file metadata, hash, managed installer, reputation, path, or launching-process criteria.
A hash rule is usually unsuitable for development output because recompiling changes the binary. That recommendation is an inference from Microsoft’s documented rule types; the appropriate rule must be selected by whoever owns the policy.
References:
- App Control debugging and troubleshooting
- Understanding App Control event IDs
- Smart App Control FAQ
- Managing policies with CiTool
Help make this community better for everyone: If this answer helped or resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution. Thank you.