Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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.

I disagree, see this article. If it works for an MFC application, surely it will work for any other unmanaged C++ app too. The solution was to embed a source file that is compiled with /clr. (Remember C++ can be compiled to MSIL) This article from the MSDN seems to agree too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top