What are possible reasons for getting the Program Compatibility Assistant dialog after my application closes?
(source: microsoft.com)
EDIT: Program Compatibility Assistant: frequently asked questions
I realize this question has already been asked on S.O.
However, my app:
<compatibility>
node to application manifestNote #6, with the following app.manifest, I no longer get the PCA:
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</compatibility>
</asmv1:assembly>
So that second part seems to fix it, but I am worried that my application is still doing something that I am unaware of.
To be clear, I'm asking a 2 part question:
<compatibility>
node absolutely necessary in order to avoid the PCA dialog? Or might I still be doing something wrong?This MSDN article describes the many conditions that can cause the Program Compatibility Assistant to kick in. I would review the set of scenarios that it describes and see whether any of them apply to your program. I do see causes for PCA dialogs outside of the conditions you ruled out (e.g., attempting to create a new folder under %ProgramFiles%
).