OneClick deployment and publishing is great because it provides an automatic update feature that refreshes thick client application installs at intervals or startup as new builds become available. However, one of the main drawbacks to this technology has been that there is no easy user interface to publish across domains over FTP because of the credentials required. At first glance, this seriously limits build automation through MSBuild and/or Team Foundation Server 2010. However, with a little negotiation, it is easy to pass domain credentials into the publish FTP server path.
Where do you want to publish this application?
Regardless of if you are using MSBuild for later automation, it is nice to have single-click publishing to FTP from the IDE without a login prompt. Also, you should test your FTP publish location using OneClick publishing found under the VS2010 Build, Publish [Application Name] menu before deciding on automation methods.
So where it says "Specify the location to publish this application", you might enter the FTP URL with full credentials:
The problem is that when you do this, you will encounter an error which says Invalid value for 'Publish URL': The given path's format is not supported.
The correct 'Publish URL' FTP syntax
Don't panic, the reason for this error is because the publishing engine does not know how to escape the URL. You must create a function to do this (e.g.,
new uri("FTP URL").toString()) or manually escape the backslash between the domain and the login name:
I think it is strange that the OneClick wizard does not have an interface for impersonation credentials and MSBuild seems to hide this functionality. You would think that this would be a core OneClick feature, but that's okay because you have this article in the interim.