Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. I hate ClickOnce [modified]

I hate ClickOnce [modified]

Scheduled Pinned Locked Moved The Lounge
questioncomarchitecturehelpannouncement
18 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Christian Graus

    So, it was pointed out to me that ClickOnce does the whole online download thing automatically, far nicer than having to run an update manually. So, I create a clickonce project for our application. It reports that it has uploaded to our FTP, however, it's not there. It's in a folder named after the FTP URL. If I copy the files from there onto our FTP, it doesn't work. But, if I run it often enough, every once in a while, for no reason that I can see, it asks for the username/password for the FTP, and then it works. Now, I've changed PCs, and it continues to create installers on my local drive. However, when it's done, it goes to the publish URL and seems to install the latest app, even though it's not there, it's on a local drive. The whole thing is a mystery to me. Oh, and why can't I install to program files ? Why does it have to be some obscure and twisted URL ? <edit>Oh, and if I copy the files from local onto the FTP, the installer blows up. So, what is the use of those local files ? Why doesn't it tell me if it has an issue with the FTP ( I don't see how it can, b/c IE is logged into it fine )</edit> <edit>OK - it seekms that it can't workout ftp.mysite.com, it needs to be ftp://ftp.mysite.com. I can accept that, but surely it could notice that I have ftp.xxx.com/myfolder, and am downloading from www.xxx.com/myfolder, and ask me if I meant to FTP it ? Oh - the upload started, claimed to have succeeded, but didn't finish, and didn't work. </edit>

    Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

    modified on Wednesday, September 24, 2008 5:17 PM

    B Offline
    B Offline
    Bassam Saoud
    wrote on last edited by
    #2

    Everyone knows the ClickOnce doesnt work on Wednesday. You need to check back tommorow.

    1 Reply Last reply
    0
    • C Christian Graus

      So, it was pointed out to me that ClickOnce does the whole online download thing automatically, far nicer than having to run an update manually. So, I create a clickonce project for our application. It reports that it has uploaded to our FTP, however, it's not there. It's in a folder named after the FTP URL. If I copy the files from there onto our FTP, it doesn't work. But, if I run it often enough, every once in a while, for no reason that I can see, it asks for the username/password for the FTP, and then it works. Now, I've changed PCs, and it continues to create installers on my local drive. However, when it's done, it goes to the publish URL and seems to install the latest app, even though it's not there, it's on a local drive. The whole thing is a mystery to me. Oh, and why can't I install to program files ? Why does it have to be some obscure and twisted URL ? <edit>Oh, and if I copy the files from local onto the FTP, the installer blows up. So, what is the use of those local files ? Why doesn't it tell me if it has an issue with the FTP ( I don't see how it can, b/c IE is logged into it fine )</edit> <edit>OK - it seekms that it can't workout ftp.mysite.com, it needs to be ftp://ftp.mysite.com. I can accept that, but surely it could notice that I have ftp.xxx.com/myfolder, and am downloading from www.xxx.com/myfolder, and ask me if I meant to FTP it ? Oh - the upload started, claimed to have succeeded, but didn't finish, and didn't work. </edit>

      Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

      modified on Wednesday, September 24, 2008 5:17 PM

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #3

      The uploading bug is Visual Studio's problem, not ClickOnce. There *are* real problems with ClickOnce, however. One nasty one is the certificate expiration problem. It's nice for auto-updates, though. :-) >> why can't I install to program files ? That requires elevation for non-admin users.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Feelings-Based Morality of the Secular World The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      C B 2 Replies Last reply
      0
      • J Judah Gabriel Himango

        The uploading bug is Visual Studio's problem, not ClickOnce. There *are* real problems with ClickOnce, however. One nasty one is the certificate expiration problem. It's nice for auto-updates, though. :-) >> why can't I install to program files ? That requires elevation for non-admin users.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Feelings-Based Morality of the Secular World The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #4

        Judah Himango wrote:

        The uploading bug is Visual Studio's problem, not ClickOnce.

        But, is there another way to do it ? If not, then it doesn't really matter whose fault it is, it makes the whole thing useless, right ?

        Judah Himango wrote:

        It's nice for auto-updates, though

        Yeah, that's why I am persisting with it.

        Judah Himango wrote:

        That requires elevation for non-admin users.

        I couldn't even find a way to make it happen at all. Not even publishing from a local drive (which appears to be all that actually works reliably), on a machine where I am admin.

        Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

        J G 2 Replies Last reply
        0
        • C Christian Graus

          Judah Himango wrote:

          The uploading bug is Visual Studio's problem, not ClickOnce.

          But, is there another way to do it ? If not, then it doesn't really matter whose fault it is, it makes the whole thing useless, right ?

          Judah Himango wrote:

          It's nice for auto-updates, though

          Yeah, that's why I am persisting with it.

          Judah Himango wrote:

          That requires elevation for non-admin users.

          I couldn't even find a way to make it happen at all. Not even publishing from a local drive (which appears to be all that actually works reliably), on a machine where I am admin.

          Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

          J Offline
          J Offline
          Judah Gabriel Himango
          wrote on last edited by
          #5

          Yes, there is another way to do it: use MsBuild to build your .sln or .csproj, passing in /target:publish switch. This will generate the ClickOnce files. Then you're free to do whatever you want with them; manually copy them to FTP or whatever. We do automated builds here; we use the above technique to generate the ClickOnce files, then a Powershell script to deploy the files out to where we need them. Regarding installation to program files, ClickOnce deliberately doesn't allow installation into program files. It installs your app into the ClickOnce store, which doesn't require admin privs. If you're really set on installing into Program Files, you can do a traditional installer + ClickOnce.

          Tech, life, family, faith: Give me a visit. I'm currently blogging about: Feelings-Based Morality of the Secular World The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

          C 1 Reply Last reply
          0
          • J Judah Gabriel Himango

            Yes, there is another way to do it: use MsBuild to build your .sln or .csproj, passing in /target:publish switch. This will generate the ClickOnce files. Then you're free to do whatever you want with them; manually copy them to FTP or whatever. We do automated builds here; we use the above technique to generate the ClickOnce files, then a Powershell script to deploy the files out to where we need them. Regarding installation to program files, ClickOnce deliberately doesn't allow installation into program files. It installs your app into the ClickOnce store, which doesn't require admin privs. If you're really set on installing into Program Files, you can do a traditional installer + ClickOnce.

            Tech, life, family, faith: Give me a visit. I'm currently blogging about: Feelings-Based Morality of the Secular World The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #6

            OK - thanks for the info.

            Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

            1 Reply Last reply
            0
            • C Christian Graus

              So, it was pointed out to me that ClickOnce does the whole online download thing automatically, far nicer than having to run an update manually. So, I create a clickonce project for our application. It reports that it has uploaded to our FTP, however, it's not there. It's in a folder named after the FTP URL. If I copy the files from there onto our FTP, it doesn't work. But, if I run it often enough, every once in a while, for no reason that I can see, it asks for the username/password for the FTP, and then it works. Now, I've changed PCs, and it continues to create installers on my local drive. However, when it's done, it goes to the publish URL and seems to install the latest app, even though it's not there, it's on a local drive. The whole thing is a mystery to me. Oh, and why can't I install to program files ? Why does it have to be some obscure and twisted URL ? <edit>Oh, and if I copy the files from local onto the FTP, the installer blows up. So, what is the use of those local files ? Why doesn't it tell me if it has an issue with the FTP ( I don't see how it can, b/c IE is logged into it fine )</edit> <edit>OK - it seekms that it can't workout ftp.mysite.com, it needs to be ftp://ftp.mysite.com. I can accept that, but surely it could notice that I have ftp.xxx.com/myfolder, and am downloading from www.xxx.com/myfolder, and ask me if I meant to FTP it ? Oh - the upload started, claimed to have succeeded, but didn't finish, and didn't work. </edit>

              Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

              modified on Wednesday, September 24, 2008 5:17 PM

              M Offline
              M Offline
              mpuk
              wrote on last edited by
              #7

              Another problem is that it can't include unmanaged dlls. If your project includes some unmanaged dll, it won't be published by click once. To me this is quite a serious limitation and an undocumented one at that.

              G B 2 Replies Last reply
              0
              • C Christian Graus

                So, it was pointed out to me that ClickOnce does the whole online download thing automatically, far nicer than having to run an update manually. So, I create a clickonce project for our application. It reports that it has uploaded to our FTP, however, it's not there. It's in a folder named after the FTP URL. If I copy the files from there onto our FTP, it doesn't work. But, if I run it often enough, every once in a while, for no reason that I can see, it asks for the username/password for the FTP, and then it works. Now, I've changed PCs, and it continues to create installers on my local drive. However, when it's done, it goes to the publish URL and seems to install the latest app, even though it's not there, it's on a local drive. The whole thing is a mystery to me. Oh, and why can't I install to program files ? Why does it have to be some obscure and twisted URL ? <edit>Oh, and if I copy the files from local onto the FTP, the installer blows up. So, what is the use of those local files ? Why doesn't it tell me if it has an issue with the FTP ( I don't see how it can, b/c IE is logged into it fine )</edit> <edit>OK - it seekms that it can't workout ftp.mysite.com, it needs to be ftp://ftp.mysite.com. I can accept that, but surely it could notice that I have ftp.xxx.com/myfolder, and am downloading from www.xxx.com/myfolder, and ask me if I meant to FTP it ? Oh - the upload started, claimed to have succeeded, but didn't finish, and didn't work. </edit>

                Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

                modified on Wednesday, September 24, 2008 5:17 PM

                S Offline
                S Offline
                Simon P Stevens
                wrote on last edited by
                #8

                Christian Graus wrote:

                www.xxx.com

                You building p0rn diallers now then Christian? I'm not sure clickonce is the way to go for these, you need to consider sending them out via the mass spam email technique.

                Simon

                1 Reply Last reply
                0
                • C Christian Graus

                  Judah Himango wrote:

                  The uploading bug is Visual Studio's problem, not ClickOnce.

                  But, is there another way to do it ? If not, then it doesn't really matter whose fault it is, it makes the whole thing useless, right ?

                  Judah Himango wrote:

                  It's nice for auto-updates, though

                  Yeah, that's why I am persisting with it.

                  Judah Himango wrote:

                  That requires elevation for non-admin users.

                  I couldn't even find a way to make it happen at all. Not even publishing from a local drive (which appears to be all that actually works reliably), on a machine where I am admin.

                  Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

                  G Offline
                  G Offline
                  greatM
                  wrote on last edited by
                  #9

                  Judah Himango wrote: That requires elevation for non-admin users. I couldn't even find a way to make it happen at all. Not even publishing from a local drive (which appears to be all that actually works reliably), on a machine where I am admin. --------- have u tried to publish it onto local site like http://manoj/GreatX/ which as u know puts all necessary files in C:\Inetpub\wwwroot\GreatX\ (assuming defaults)? then this folder you can upload to your desired ftp location. a simple batch file can b made to do so. in fact it is far simple and better than java's webstart technology in many ways. if u can use separate modules for making changes in database then clickonce is best way to provide update program to all users.

                  manoj sharma 09313603665 manoj.great@yahoo.com

                  1 Reply Last reply
                  0
                  • M mpuk

                    Another problem is that it can't include unmanaged dlls. If your project includes some unmanaged dll, it won't be published by click once. To me this is quite a serious limitation and an undocumented one at that.

                    G Offline
                    G Offline
                    greatM
                    wrote on last edited by
                    #10

                    if u add any unmanaged dll in your project as just simple files then at the time of publishing it is included. you can check this from project properties -> publish -> application files.

                    manoj sharma 09313603665 manoj.great@yahoo.com

                    M 1 Reply Last reply
                    0
                    • G greatM

                      if u add any unmanaged dll in your project as just simple files then at the time of publishing it is included. you can check this from project properties -> publish -> application files.

                      manoj sharma 09313603665 manoj.great@yahoo.com

                      M Offline
                      M Offline
                      mpuk
                      wrote on last edited by
                      #11

                      Yes but it doesn't work when your program tries to call them. Try it. I've spend about 3 days on that in the past with VS 2005 and didn't work. I don't know if they've fixed it now.

                      1 Reply Last reply
                      0
                      • J Judah Gabriel Himango

                        The uploading bug is Visual Studio's problem, not ClickOnce. There *are* real problems with ClickOnce, however. One nasty one is the certificate expiration problem. It's nice for auto-updates, though. :-) >> why can't I install to program files ? That requires elevation for non-admin users.

                        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Feelings-Based Morality of the Secular World The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

                        B Offline
                        B Offline
                        Brian Noyes
                        wrote on last edited by
                        #12

                        The certificate problem has been fixed in .NET 3.5 and .NET 2.0 SP2. One specific (by design, maybe not best design) limitation of ClickOnce: you have no control over the install directory, it is always in a generated obfuscated directory under the user's profile.

                        Brian Noyes Software Insight brian@softinsight.com www.softinsight.com

                        J 1 Reply Last reply
                        0
                        • M mpuk

                          Another problem is that it can't include unmanaged dlls. If your project includes some unmanaged dll, it won't be published by click once. To me this is quite a serious limitation and an undocumented one at that.

                          B Offline
                          B Offline
                          Brian Noyes
                          wrote on last edited by
                          #13

                          If they are COM unmanaged DLLs, then you need to follow the steps for Reg-Free COM. This article outlines how to do that: http://msdn.microsoft.com/en-us/magazine/cc188708.aspx. For other unmanaged (i.e. C-style DLL calls, it should work fine as long as you include those files as part of the VS project as Content files so they end up in the Application Files listing under the Publish tab in project properties, and that youo make sure they are in the project root folder so that they end up in the same folder as the exe when deployed by ClickOnce.

                          Brian Noyes Software Insight brian@softinsight.com www.softinsight.com

                          M 1 Reply Last reply
                          0
                          • B Brian Noyes

                            If they are COM unmanaged DLLs, then you need to follow the steps for Reg-Free COM. This article outlines how to do that: http://msdn.microsoft.com/en-us/magazine/cc188708.aspx. For other unmanaged (i.e. C-style DLL calls, it should work fine as long as you include those files as part of the VS project as Content files so they end up in the Application Files listing under the Publish tab in project properties, and that youo make sure they are in the project root folder so that they end up in the same folder as the exe when deployed by ClickOnce.

                            Brian Noyes Software Insight brian@softinsight.com www.softinsight.com

                            M Offline
                            M Offline
                            mpuk
                            wrote on last edited by
                            #14

                            I completely understand what you are saying and I agree about what they *should* be doing, the thing is the process was bugged when I tried it and I am 100% certain about it. If I remember correctly at some stage I managed to get them to the publish directory, but then they wouldn't get copied during installation.

                            B 1 Reply Last reply
                            0
                            • B Brian Noyes

                              The certificate problem has been fixed in .NET 3.5 and .NET 2.0 SP2. One specific (by design, maybe not best design) limitation of ClickOnce: you have no control over the install directory, it is always in a generated obfuscated directory under the user's profile.

                              Brian Noyes Software Insight brian@softinsight.com www.softinsight.com

                              J Offline
                              J Offline
                              Judah Gabriel Himango
                              wrote on last edited by
                              #15

                              How has it been fixed? Link?

                              Tech, life, family, faith: Give me a visit. I'm currently blogging about: Feelings-Based Morality of the Secular World The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

                              B 1 Reply Last reply
                              0
                              • M mpuk

                                I completely understand what you are saying and I agree about what they *should* be doing, the thing is the process was bugged when I tried it and I am 100% certain about it. If I remember correctly at some stage I managed to get them to the publish directory, but then they wouldn't get copied during installation.

                                B Offline
                                B Offline
                                Brian Noyes
                                wrote on last edited by
                                #16

                                Not sure what to tell you there without a repro of what you did. But ClickOnce is really just a fancy file copy mechanism. Chances are something was gooned with the way you were adding things to your project or if you were editing the manifest directly (which is often a better way to go since then the "magic" of VS is out of the loop). Whatever the list of files in the app manifest, that is what ClickOnce will download. If it can't validate the files (based on a file hash) or find them, it barfs with a complaint about the app manifest being invalid. So if you were not getting that, chances are you probably were not getting the files listed in the app manifest correctly. Best way to know for sure, fire up Mageui.exe, open the .exe.manifest file and see what is listed there.

                                Brian Noyes Software Insight brian@softinsight.com www.softinsight.com

                                M 1 Reply Last reply
                                0
                                • J Judah Gabriel Himango

                                  How has it been fixed? Link?

                                  Tech, life, family, faith: Give me a visit. I'm currently blogging about: Feelings-Based Morality of the Secular World The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

                                  B Offline
                                  B Offline
                                  Brian Noyes
                                  wrote on last edited by
                                  #17

                                  Haven't seen a good post on how this works anywhere, just know the fix was put in in 3.5. The way it works is pretty complicated, a combination of who issued the certificate, to who, where it is located, etc. Bottom line: If you have an app deployed with an issued certificate, you renew that cert and the issuer nor the subject name do not change (but the expiration and public/private key pair do), updates to the app will succeed whereas before the fix the update with the new cert would block the installation and you had to have users uninstall / reinstall to work around.

                                  Brian Noyes Software Insight brian@softinsight.com www.softinsight.com

                                  1 Reply Last reply
                                  0
                                  • B Brian Noyes

                                    Not sure what to tell you there without a repro of what you did. But ClickOnce is really just a fancy file copy mechanism. Chances are something was gooned with the way you were adding things to your project or if you were editing the manifest directly (which is often a better way to go since then the "magic" of VS is out of the loop). Whatever the list of files in the app manifest, that is what ClickOnce will download. If it can't validate the files (based on a file hash) or find them, it barfs with a complaint about the app manifest being invalid. So if you were not getting that, chances are you probably were not getting the files listed in the app manifest correctly. Best way to know for sure, fire up Mageui.exe, open the .exe.manifest file and see what is listed there.

                                    Brian Noyes Software Insight brian@softinsight.com www.softinsight.com

                                    M Offline
                                    M Offline
                                    mpuk
                                    wrote on last edited by
                                    #18

                                    Thanks for the reply and the suggestion. Yes I did try the magegui too and edited the manifest back then when I had the problem, still didn't solve it. I am convinced it was bugged at that point. I guess it's a bit of a moot point now since I've moved to VS2008 and frankly I don't want to spend the time to retry the thing (although I still have VS2005 installed for backwards compatibility). I could reproduce it but I don't feel like doing it right now cause I don't work on that project any more. Just for the record I ended up writing my own auto update for the application which was not that hard after all. As you said it's just a fancy copying.

                                    1 Reply Last reply
                                    0
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • World
                                    • Users
                                    • Groups