質問

This is related to this article but is not a duplicate.

I have a WPF app deployed via ClickOnce, and one of the projects in the solution is simple UI-less standalone Winforms app. This exe should live in the same directory of the main wpf exe. What happens after deploying is that this app runs instead of the wpf app. When I looked at the manifest, the entry point was set to the winforms app instead of the wpf app. I am not sure if its alphabetically related (the name of the winforms app is listed before the wpf one in the filesystem after deployment), but what I want to do is change the entry point in the manifest programmatically (via commandline arguments).

MageUI lets you define the entry point, just like RobinDotNet reveals, but is there a commandline switch to do this via mage.exe?

役に立ちましたか?

解決

No. That's what I found frustrating with the command line version of Mage. Usually you can do more with the command line version of an app, not less. But there are several things MageUI can do that the command line version can't.

Here's what MSDN says about it...

Mage.exe will also use a simple set of heuristics to detect the main executable for the application, and will mark it as the ClickOnce application's entry point in the manifest.

I don't know what those heuristics are, but I would start by playing with the names of the exes. If all else fails, you can...

  1. Generate the manifest with mage.
  2. Modify the entry point in the manifest with your own code.
  3. Re-sign the manifest with mage.
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top