Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Mage.exe not generate a compatibleFrameworks attribute?

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?

like image 290
Kev Hunter Avatar asked Apr 16 '10 15:04

Kev Hunter


People also ask

What does Mage exe do?

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.

How do I open MageUI exe?

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.


2 Answers

Add this to your GenerateDeploymentManifest MSBuild task

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

and that should fix it

like image 34
David Anderson Avatar answered Dec 17 '22 17:12

David Anderson


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.

like image 166
joshuapoehls Avatar answered Dec 17 '22 15:12

joshuapoehls