I hate ClickOnce [modified]
-
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
-
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
Everyone knows the ClickOnce doesnt work on Wednesday. You need to check back tommorow.
-
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
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
-
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
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.
-
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.
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
-
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
OK - thanks for the info.
Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.
-
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
-
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
Christian Graus wrote:
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
-
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.
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
-
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.
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
-
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
-
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
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
-
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.
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
-
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
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.
-
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
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
-
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.
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
-
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
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
-
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
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.