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?
The Manifest Generation and Editing Tool (Mage.exe) is a command-line tool that supports the creation and editing of application and deployment manifests. As a command-line tool, Mage.exe can be run from both batch scripts and other Windows-based applications, including ASP.NET applications.
To run the tool, use Visual Studio Developer Command Prompt or Visual Studio Developer PowerShell. Two versions of Mage.exe and MageUI.exe are included as a component of Visual Studio. To see version information, run MageUI.exe, select Help, and select About. This documentation describes version 4.0.
Add this to your GenerateDeploymentManifest MSBuild task
TargetFrameworkMoniker=".NETFramework,Version=v4.0"
and that should fix it
There is a separate copy of mage.exe
built for .NET 4.0. Try using this copy from C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools
(or ...\v7.1\Bin\NETFX 4.0 Tools
depending on which SDK version you have installed).
I was actually having this same problem and using the mage.exe
from NETFX 4.0 Tools
fixed it for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With