21
在我的應用程序關閉後獲取程序兼容性助手對話框的可能原因是什麼?獲取程序兼容性助手對話框的原因?
Program Compatibility Assistant image http://i.msdn.microsoft.com/dynimg/IC5958.gif
編輯:Program Compatibility Assistant: frequently asked questions
我意識到這個問題已經被問過S.O.
- Program Compatibility Assistant thinks my app is an installer
- Windows 7 Program Compatibility Assistant appeared for my app. Why?
- Why I receive a message from the Program Compatibility Assistant?
- How do I prevent programmatically the 「Program Compatibility Assistant」 in Vista (and Windows 7) from appearing?
然而,我的應用程序:
- 只得到PCA後關閉
- 從IDE
- 運行時不會嘗試做任何事情需要提升權限(我不認爲)
- 沒有得到PCA不是安裝程序/安裝程序
- 沒有在程序名爲「安裝程序」或「設置」
- 它關閉時,不拋出一個異常,或退出比0的代碼(我不認爲)
- 沒有得到PCA如果我添加
<compatibility>
節點應用程序清單
注意#6,具有以下app.manifest,我不再讓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>
使第二部分似乎修復它,但我擔心我的應用程序是仍然在做一些我不知道的事情。
要清楚,我問一個2部分的問題:
- 什麼問題都可以導致出現PCA對話框?
- 爲避免PCA對話框,
<compatibility>
節點是否絕對必要?或者我仍然可能做錯了什麼?
+1。好問題,但imgur圖像消失了。 – gary 2012-05-02 16:40:13