views:

188

answers:

2

I have a c++ console application which I would like to publish using clickonce.

When I run the mageui.exe tool and import the executable and dependent files to make an application manifest, it won't let me set the app.exe as the entry point. I can set the entry point, but when I click off the line and go to save, it clears the dialog and complains that I do not have a valid entry point.

If I save anyway, the entryPoint is empty on the resultant manifest. That makes clickonce fail because there is no valid entrypoint.

I've tried manually creating an entry point as follows:

  <entryPoint>
 <assemblyIdentity
  type='win32'
  name='My App'
  version='0.9.1.0'
  processorArchitecture='msil'
  language='en-US'/>
    <commandLine
        file="app.exe"
        parameters="run"/>
  </entryPoint>

That doesn't work either.

+2  A: 

Between the "assembly identity" and setting the processor architecture to MSIL, it seems like you're telling it that the entry point is into a .NET assembly of some kind.

Unfortunately, from cursory searching it seems you cannot deploy an unmanaged/native application with clickonce. The entry point must be managed.

You can create a shim as described here.

ravuya
A: 

The app has to be managed. ClickOnce uses the security system built into the CLR for restricting what the app can do. Native code has nothing like that.

Michael Dunn