Visual Studio 2017发布VB.NET窗体应用后报0x800705AA资源不足错误
I’ve helped troubleshoot this exact scenario before—your VB.NET WinForms app runs flawlessly in Visual Studio 2017, but after publishing, you hit this error:
Insufficient system resources exist to complete the requested service. (Exception from HRESULT: 0x800705AA)
And you’ve already noticed disabling McAfee makes the problem go away—great catch, that lines up with common McAfee interference issues.
What’s Going On Here?
The 0x800705AA error usually gets blamed on "system resource exhaustion," but in this case, it’s almost certainly McAfee’s real-time scanning hogging critical resources during your app’s startup or blocking specific operations the app needs to run. IDE environments like Visual Studio often get implicit trust from antivirus tools, but published EXEs trigger full, aggressive scans that can choke your app’s ability to access system resources when it needs them most.
Fixes to Try
- Temporary Verification: First, fully disable McAfee’s real-time protection (including modules like Access Protection and Script Scan) and run your published app. If it works without errors, you’ve confirmed McAfee is the root cause.
- Permanent Solution #1: Add Exclusions
- Open the McAfee console, navigate to Real-Time Scan → Exclusions.
- Add your app’s entire installation folder and the published EXE file to the exclusion list. This tells McAfee to skip scanning these files, eliminating the resource conflict.
- Permanent Solution #2: Adjust McAfee Policies
- If you’re in an enterprise environment, reach out to your IT team to adjust McAfee’s group policy: lower the scan priority for .NET applications, or whitelist your app’s signature to avoid aggressive scanning.
- Bonus: Tweak Publish Settings
- When publishing your app, choose the Self-Contained Deployment option instead of relying on the shared .NET Framework. This reduces runtime dependency loading and lowers the chance of McAfee flagging or interfering with your app’s startup.
Important note: Disabling antivirus is only for troubleshooting—never leave it off in production environments. Use exclusions or policy adjustments instead.
内容的提问来源于stack exchange,提问作者JHerk

