locked
Including non referenced dll in ClickOnce deployment RRS feed

  • Question

  • I'm deploying an applikation using ClickOnce

    I need to include a dll from another project in the solution. This dll is not directly referenced in the project I'm trying to deploy, but is added as a Project dependency.

    This dll is not getting bublished alongside the rest of the project files and references.

    How do I get the ClickOnce deployment to include this dll file??

    --
    sparrez
    Wednesday, November 8, 2006 2:12 PM

Answers

  • You actually have no choice in VS whether to sign the ClickOnce manifests because they are required by ClickOnce.

    So, what I think happened is you installed with the VS created key, and then you made modifications with Mage and then signed with a different key... hence the "identity has changed" error.

    If that's what happened, just resign your manifests using Mage with the key in your VS project.

     

    Tuesday, November 14, 2006 7:48 PM
  • Sparre,

    In addition to updating and signing the .manifest file, you also have to update the .application file. Open .application file in MageUI, go to Application Reference page, click on Select Manifest button, and select your .manifest file. Then click save and sign the .application file.

    Leonid.

    Wednesday, November 15, 2006 5:24 PM

All replies

  • Hello,

    Its seems that clickonce only published dll part of the bin directory, you can add post build action copy that file (dll) to the bin location (auto process).

    I check the mageui application , there is no way of adding new file to the application file list.

    thanks.

    Yaron Karni

    www.attunity.com

    http://dotnetbible.blogspot.com

     

    Wednesday, November 8, 2006 2:23 PM
  • You can use mageui to add files, just point to the folder and click Populate. It will also check for subfolders, and add files from there.

    Mage.exe with -u and -fd switch will do the same from the command line.

    Leonid.

     

    Wednesday, November 8, 2006 6:34 PM
  • If you add the .dll to the project and set it's Build Action to "Content", then it will be included, and it will show up in the Application Files dialog on the Publish tab where you can verify this.

     

    Friday, November 10, 2006 4:46 AM
  • The thing is I really don't want a direct reference to the assembly in the project.

    We use Reflection to create objects from different assemblies dynamically and we don't have the possibilty to have all those referenced in the project as some are delivered by third party.

    But I think the MageUI approach is the way to go for now. If I could just get it to work :o)
    Friday, November 10, 2006 8:43 AM
  • Ok, I seem to have created the ClickOnce manifests succesfully using the MageUI.exe app

    But how do I add the setup.exe file and the publish.htm page ??

    --
    Sparre
    Friday, November 10, 2006 10:02 PM
  • 1. I'd use msbuild publish target to get setup.exe file. Another way is by using GenerateBootstrapper msbuild task, but you would have to provide all parameters manually and then use SignFile task to sign it.

    Using publish task also automatically gives you prerequisites (if you have any, Crystal, for example) listed in the manifest, MageUI will leave those prerequisites untouched when you update the manifest. 

    2. Publish.htm page is generated by VS2005, there is no way to get it outside of Visual Studio. You can generate it once, and then reuse by updating the version tag inside the page.

    Leonid.

    Saturday, November 11, 2006 12:00 AM
  • Exactly...

    So, the easiest way is to build the project using Visual Studio, then use MageUI to modify the ClickOnce manifest if you need to. This way, you get the publish.htm and the setup.exe bootstrapper built for you and all hooked up.

    I did want to clarify something from before... you don't need to add the file as a reference, just add it as a file to the project... then it will be available as a downloaded file.  MageUI is another way to make this happen.

    If you like the command line / SDK way of building these things, you can download and use Bootstrapper Manifest Generator to create an MSBuild project to build the bootstrapper.  It's at: http://www.gotdotnet.com/Workspaces/Workspace.aspx?id=ddb4f08c-7d7c-4f44-a009-ea19fc812545 

     

    Tuesday, November 14, 2006 5:55 AM
  • Thank you

    So, I tried deplying it and then adding the dll to the folder where I published to, and the adding the file to the manifest using the MagUI app

    But the I got the following errors when trying to run the app from the website

    + Manifest XML signature is not valid.
    + No signature was present in the subject.


    So I tried signing it by making a new keyfile in MageUI, no problem there, but the I get the following error

    + Reference in the deployment does not match the identity defined in the application manifest.

    Any idea how to solve this?, what is causing it?
    Tuesday, November 14, 2006 7:44 AM
  • Did you re-sign the deployment manifest after making changes to the application manifest? If not, use MageUI or Mage to do so. The deployment manifest keeps a reference (including hash value) to the application manifest, so any changes invalidate the reference.

    Leonid

     

    Tuesday, November 14, 2006 1:22 PM
  • From Visual Studio I decided not to sign ClickOnce apps, but in MageUI I created a signing key file and added that to the manifests, both the .manistest and the .application files

    I'll see if there is a difference

    --
    Sparre


    Tuesday, November 14, 2006 3:00 PM
  • You actually have no choice in VS whether to sign the ClickOnce manifests because they are required by ClickOnce.

    So, what I think happened is you installed with the VS created key, and then you made modifications with Mage and then signed with a different key... hence the "identity has changed" error.

    If that's what happened, just resign your manifests using Mage with the key in your VS project.

     

    Tuesday, November 14, 2006 7:48 PM
  • Ok I tried that, but no luck :-( Getting the following error

    + Application manifest has either a different computed hash than the one specified or no hash specified at all.
    + File, MyApplication.exe.manifest, has a different computed hash than specified in manifest.


    Heres what I did

    1. Opened the Properties page for the VS project
    2. Selected the "Signing" tab and created a new Test Certificate to sign the ClickOnce manifests with
    3. Published the application
    4. Added 2 files to the *_1_0_0_0 folder
    5. Opened MageUI and repopulated the folder to add the files
    6. Saved and signed with the same key-file I created in VS

    But that didn't work.....

    --
    Sparre
    Wednesday, November 15, 2006 6:48 AM
  • Sparre,

    In addition to updating and signing the .manifest file, you also have to update the .application file. Open .application file in MageUI, go to Application Reference page, click on Select Manifest button, and select your .manifest file. Then click save and sign the .application file.

    Leonid.

    Wednesday, November 15, 2006 5:24 PM
  • Thank you all, now it's working :o)
    Thursday, November 16, 2006 12:44 PM
  • I am having a similar problem. I got the non referenced dll to work, but the problem I am having now is with a com component that is referenced in the other project. It is not referenced in the shell. I tried adding it as a reference in the shell project and then tried to open up the manifest file with mageui, but when I save the file in mageui, it overwrites the clsid information on the com dll's. Any idea on how I can solve this problem? Thanks.
    Tuesday, November 21, 2006 4:31 AM
  • Sparre, Can you plz elaborate what made it working for you finally? I am getting same issue. I have created .pfx file from VS2012, published click once from VS2012. To add few of my dlls, i have used MageUI. I saved .application and .manifest file with VS generated pfx, it throws error while running setup.exe. I tried modifying .application file in root folder and Application Files app version folder also, still no luck.

    Minni

    Monday, October 14, 2013 2:37 PM
  • After too much of struggle, i figured out how to resolve it. In MageUI, when you click on Populate button, delete .application file and then save .manifest file. Then, resign all 3 manifests using Mage commands. It'll work.

    Minni

    • Proposed as answer by minziw Tuesday, October 29, 2013 8:12 AM
    Tuesday, October 29, 2013 8:12 AM