Why does Mage.exe not generate a compatibleFrameworks attribute?

.net-4.0, clickonce, mage

Solution

Add this to your GenerateDeploymentManifest MSBuild task

   TargetFrameworkMoniker=".NETFramework,Version=v4.0"        

and that should fix it

Problem

We are using Mage.exe to generate our application's manifests as part of our build process. Upon upgrading to .NET 4 we now find it generates an invalid manifest. The reason is there isn't a compatibleFrameworks attribute being set in the application manifest which we generate every build. Is there a way we can make Mage.exe add this element or should we only ever update existing manifests?

Original source

Related problems