Thank you for reply. I already studied that link and all info about problem deeply. In reality check attached pic:

- Unable.png (6.62 KiB) Viewed 4139 times
Here background:
.NET 4 native apps works as intended, 2.0, 3.5, 3.5 Client all failed if there are only .NET 4 installed. You can check it yourself, just grab clean XP Virtual Machine, e.g. IE VHD and setup there .NET 4 only. Any older app will fail.
Primary reason for that:
http://msdn.microsoft.com/en-us/library/w4atty68.aspx runtime check <supportedRuntime> element and if not presented give that error. If you specify your usual runtime, i.e.
Code: Select all
<startup><supportedRuntime version="v2.0.50727" sku="Client"/></startup></configuration>
for 3.5 Client
than you got another error message:

- Unable2.png (7.89 KiB) Viewed 4139 times
If you remove sku="Client" you got:

- Unable3.png (8.62 KiB) Viewed 4139 times
Microsoft tells the truth, of cause. If you specify:
Code: Select all
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
or even without sku attribute "old" assemblies will run, but another trouble will come, some assemblies, for example mixed mode assemblies, will not run until you specify
useLegacyV2RuntimeActivationPolicy:
Code: Select all
<startup useLegacyV2RuntimeActivationPolicy="true"><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
But after all you get:

on older framework.
Of cause, this can be relatively easy avoid by using configuration files depended on framework installed or better adding several supportedRuntime tags but developer must think about that. Having by default pass thru .NET version check if there are 4.0 installed for 3.5 (or older) assemblies I thought wrong because by default application will fail on target machine if there only .NET 4.0 framework installed and used default config.
The problem not fabricated, I run into this issue with our customers after upgraded AI and make new setup. So I decided to share problem.
By now it can be fixed by manual removing .NET 4 detect registry keys. Maybe better solution to add ".NET 3.5 only" and .NET 3.5+.NET 4 option or anyway to say about that clearly.
FOLLOW US
Get the latest news in Application Packaging