Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing product name with mage.exe

I need to update the application's manifest with a new value for 'product'. With mage.exe I can update the name and publisher but NOT the product. In MageUI you can do this, but I need to do it on the commandline.

Is there a solution or workaround for this?

like image 295
Martin Avatar asked Jul 06 '11 10:07

Martin


People also ask

How do I use Mage exe?

This tool is automatically installed with Visual Studio. 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 with Visual Studio. To see version information, run MageUI.exe, select Help, and select About.

What is MageUI?

MageUI.exe (Manifest Generation and Editing Tool, Graphical Client) - . NET Framework | Microsoft Learn.


1 Answers

I played around and it seems the command line tool indeed lacks this capability. I guess it was done for keeping it lightweight (or maybe cost issues).

Alternative would be to use the GenerateApplicationManifest MSBuild task:

Example:

<Target Name="Build">
    <GenerateApplicationManifest
        AssemblyName="myapp.exe"
        Product="My Product"
        ...
        OutputManifest="SimpleWinApp.exe.manifest">
        <Output
            ItemName="ApplicationManifest"
            TaskParameter="OutputManifest"/>
    </GenerateApplicationManifest>
</Target>

This gives you lot more options (in fact everything that you can do through MageUI, can be done from here) and you bypass mage.exe (and its limitations) totally.

You should be able to use it anywhere MSBuild is supported (csproj files, TFS Build proj files etc).

like image 184
Mrchief Avatar answered Oct 13 '22 19:10

Mrchief