Changing product name with mage.exe

二次信任 提交于 2019-12-08 15:58:16

问题


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?


回答1:


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).



来源:https://stackoverflow.com/questions/6595304/changing-product-name-with-mage-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!