Showing posts with label ClickOnce. Show all posts
Showing posts with label ClickOnce. Show all posts

Monday, April 15, 2013

The final final definitive (for now) answer for Windows 8 and ClickOnce

RobinDotNet's Blog - Windows 8 and ClickOnce : the definitive answer revisited

Since I posted the article titled Windows 8 and Click Once: the definitive answer, it became clear that it was not actually the definitive answer.

I got a ping on twitter from Phil Haack from Github telling me that this did not fix their Smart Screen filter problem.

After talking to him, and seeing his build and signing commands, I discovered they recently changed their signing certificate. For those of you who remember the early days of ClickOnce (2005) when you changed the signing certificate and everybody had to uninstall and reinstall the application, this seemed too likely an indicator to ignore.


Knowing this, it makes sense that my test application didn’t get stopped even though it was a brand new application. I signed it with my company’s signing certificate, which has been in use for several months.

Which leads me to another issue I noticed when talking to Phil. I noticed that rather than using PostBuild or BeforePublish commands, he was using AfterCompile commands to sign his executable. I asked him about it.

PostBuild, BeforePublish, and AfterCompile, oh my!

Apparently when Phil signs his executable using PostBuild or BeforePublish commands, when the user installs it, he gets the dreaded “exe has a different computed hash than specified in the manifest” error. He found that using AfterCompile instead fixed the problem.



If you are, or are planning on using ClickOnce in a Windows 8 world, this is some great information. This will save you days of frustration...


Related Past Post XRef:
ClickOnce, Windows 8 and SmartScreen (If you're using ClickOnce, planning on Windows 8 [Desktop] and don't have a CA cert, read this...)

Monday, February 25, 2013

ClickOnce, Windows 8 and SmartScreen (If you're using ClickOnce, planning on Windows 8 [Desktop] and don't have a CA cert, read this...)

RobinDotNet's Blog - Windows 8 and ClickOnce : the definitive answer

There have been a lot of copies of Windows 8 sold since it came out a few months ago, and the Surface Pro was just released. (In fact, I’m writing this on my brand new Surface Pro, which I really like, but that’s a subject for another time.)

If you’re using ClickOnce deployment, you’re probably wondering how (or if) it’s going to work with Windows 8. I’ve worked with Saurabh Bhatia at Microsoft to ensure that this article will cover what you need to know. We use ClickOnce at GoldMail (whose product is now called Point Across) for our desktop product and VSTO applications, as well as several internal utility applications, so I’ve also tested this on our products to make sure it’s accurate.

If you are hosting your deployment on a file share or on an intranet, you won’t have to make any changes. You can go get ice cream now while the rest of us soldier on.

If you are hosting your deployment on the internet, you will eventually get calls from your customers who have upgraded to Windows 8 or purchased a Windows 8 machine. So let’s talk about that.

I’m not going to talk about the bootstrapper right now; that’s going to come up later. For now, let’s concentrate on the ClickOnce application itself. When a user installs a ClickOnce application on Windows 8, here’s what happens:


How will the application work after publishing it with a signed executable?

If you sign your executable and your deployment with a valid certificate from a Certificate Authority like Verisign using one of the methods above, when the user clicks install, it will install without stopping and showing the SmartScreen filter, and updates will do the same. Yay!

Do I have to use a certificate from a Certificate Authority to circumvent the Smart Screen Filter?


Is there any workaround?



This is a great article on ClickOnce in the Win8/IE10/SmartScreen filter world. Looks like I'm going to have to pony up and get a real cert, which is not all that bad, but still...

Monday, July 09, 2012

Think having Icon and File Associations in a ClickOnce deployed app is hard? It used to be in the "old days," but not now...

LearnWPF - Adding an Icon and File Association to WPF Clickonce Applications

Although Clickonce applications originally did not have support for file associations, recent releases of the .NET framework and WPF have allowed Clickonce applications to be associated with a file extension, and for your Clickonce application icon to become the icon for that file in the windows shell.


This post reminded me of how this used to be kind of a pain, creating a file association for ClickOnce apps. I think I've still got some code in an app or two that does this manually. If we ever rev that app, I'm going to have to update it to use this method (as I love deleting code... :)


Related Past Post XRef:
Easier ClickOnce File Extension Associations (until VS2008 SP1 Ships)
Finally a Supported Method to Associate a File Extension to a ClickOnce Application

Sunday, August 22, 2010

CodePlex ClickOnce publishing from directly within Visual Studio

Visual Studio Gallery - CodePlex publishing plugin

“This extension adds a toolbar to VS, that is similar to the Web Deployment toolbar. It allows you to set up a profile (you input your CodePlex username/password and a few other fields). Once that is set up, and your project is correctly set up for ClickOnce publishes, you can simply publish using the toolbar, instead of going to your project's web page, and creating a release there.

You also have the ability to replace an existing release: that is, if a release with the specified name already exists, the extension can simply edit its description, etc. and upload the new publish zipfile.


CodePlex - CodePlex Publishing Plugin

Project Description
This addin allows publishing your project directly from Visual Studio, this eliminating the unnecessary step of going to the CodePlex site to publish.

Currently allows publishing only ClickOnce releases to CodePlex, but I may be adding the ability to publish normal releases as well; will see how useful that option might be - after all, publishing ClickOnce releases is somewhat cumbersome, but normal releases are easy enough to do through the web interface.

The recommended for download release is a ClickOnce release, published using this plugin. You will download and install a sample application that shows the currently installed version of the plugin (N/A if you dont have it), and the available version. And gives you the ability to install the new version. Since it is a ClickOnce application, it will automatically ask you to update when you run in. A good test case/example, I think.


I love developers. We can be the laziest bunch around, when we see something that’s a manual or slow operation and our first thought is, “I can automate that!”

This project is a perfect example of that. The current CodePlex ClickOnce publishing method is very manual and cumbersome. This Visual Studio plug makes it one click operation. Best of all the author has made the source available and also is eating his own dog food (i.e. using ClickOnce to publish his plugin installer).


Related Past Post XRef:
Holy ClickOnce Smoke! CodePlex now provides ClickOnce app hosting! Yes, you can now ClickOnce your CodePlex project on CodePlex servers!

Monday, July 12, 2010

Holy ClickOnce Smoke! CodePlex now provides ClickOnce app hosting! Yes, you can now ClickOnce your CodePlex project on CodePlex servers!

CodePlex Weblog - ClickOnce Releases

“With today’s release, we are happy to announce that our #1 most requested feature, hosting ClickOnce applications directly from the CodePlex website, is now available for all projects! For those that are not familiar with ClickOnce, it is a .NET deployment technology that enables a user to install and run a Windows application by simply clicking a link from a web page. ClickOnce applications are also inherently self-updating, as they check for newer versions as they become available. ClickOnce applications are also “low-impact”, in other words, they do not need administrative rights to install, only install for the current user, and are isolated from other ClickOnce applications.

Since there is no direct way of publishing your ClickOnce application to CodePlex from within Visual Studio, we have attempted to make the process as simple as possible. The next few sections will walk you through the preparation and publishing, and ultimately creating a ClickOnce release on CodePlex.


In a word, AWESOME!

This has been one of my biggest whines every time I corner someone on the CodePlex team. Now I’ll have to find something else to whine about (like maybe providing Build support…  LOL ;)

Anyway, I dig the CodePlex service and team. This thing just keeps getting better and better. If you’re doing .Net dev and need a place to store your code, host your discussions, track your issues, contain your doc’s and now host your ClickOnce apps, and like “free” then you HAVE to check out CodePlex (…I’m sure this is redundant as you’re all hosting your projects here already, right? ;)

Great work guys, thank you!

Saturday, June 21, 2008

Auto Incrementing your TeamBuild ClickOnce Deployed Application

My.RAM.Serialize() - TeamBuild ClickOnce – Auto Incrementing Your Version Information

"Using AssemblyInfoTask within your TFSBuild.proj file, you can set your builds to automatically increment your AssemblyVersion and AssemblyFileVersion.  You can also keep your application’s Publish Version in sync, which is useful if you’re publishing your application via ClickOnce. 

The Publish Version is important because that’s what ClickOnce looks at to see if there’s a new version available when the user runs the application.  Updating the AssemblyVersion or AssemblyFileVersion doesn’t tell ClickOnce that there’s a new version of your application to download.

There are a ton of blog posts like this one that tell you how to check in/out files from your TFS so I won’t repeat those steps.  The actual version updates happen inside the <AssemblyInfo> task:


Peter has done it again. He's taken a general direction, "We need a automated nightly build, with auto-ClickOnce deployment, that also auto-increments the revision and published version numbers" and turned it into reality.

It is VERY cool to have a working continuous integration process. To have a nightly build process where every morning we launch our ClickOnce app and automatically get the new nightly built version. It makes check-in fun and yet a little scary too... LOL


BTW, If you're interested in following a front line developer through his (and our) TeamBuild and other development adventures, you should check out Peter's blog. He's a content blogger, providing a look into solving real world development problems...


Related Past Post XRef:
Auto Increment Build Numbers when using TFS & TeamBuild
MSBuild Community Tasks Project
Auto Increment Visual Studio 2005 Version Build and Revision via MSBuild Task

Saturday, May 31, 2008

Easier ClickOnce File Extension Associations (until VS2008 SP1 Ships)

Re-inventing The Wheel - Tool: Editing File Associations for ClickOnce Applications

"I apologize for taking so long between posts. I have an excuse: very busy working on Visual Studio 2008 SP1 (Beta). For those of you who have downloaded the beta, this post won't do you much good, as the ability to set file associations for ClickOnce applications is already built in there. But for the rest of you, I've built a Visual Studio package based on upon a prototype I worked on for the Beta.

About the package: The package exposes an editor to work with file associations in the app.manifest file, as I wrote about in an earlier post. The editor tries to provide some error and warning feedback to cover the cases I mentioned in that post.




This post has a 2+ Coolness buff...

The news that this capability is baked into VS2008 SP1 and that, with the referenced package, we can use it today.

If you've ever tried to do hacks to get file extensions associations with older ClickOnce then you're really appreciate this..


Related Past Post XRef:
Finally a Supported Method to Associate a File Extension to a ClickOnce Application

Tuesday, May 20, 2008

ClickOnce - Getting the Application version and putting it into the Publish.htm

My.RAM.Serialize() - TeamBuild ClickOnce Versioning

"It seems many people have had issues getting the version number correctly within their tfsbuild.proj files to use in their ClickOnce html files.  The solutions I've seen were very complicated, but this may be because the examples I've seen were in TFS 2005 or they were using different tasks.

My coworker added the SDC tasks to our build server because there is functionality for XML and file manipulation.  From his starting point I went on to look further into two specific tasks: Xml.GetValue and File.RegEx.


I manually published my project to get the publish.htm file.  I then made it a part of my project so that I could copy it to my published application's directory and modify the version number.  I edited the html file and put a #VERSION# tag so that the File.RegEx task could find it and replace it with the $(ResultsItem) variable.  We get $(ResultsItem) from the ItemName attribute of the Output element within the Xml.GetValue task element.  The following is the snippet of my tfsbuild.proj file that does the versioning of the publish.htm file:


I've been pushing my team into getting our apps to be built via TeamBuild, no matter their deployment target, be it MSI or ClickOnce. Peter has been blogging about the things he's learned fighting this battle (besides "I learned my boss is a [fill in the blank]"  ;)

And with the above post, I believe the battle has finally been won! (Damn my guys are GOOD!)

Of course, being the manager that I am, I have now tasked them to write up a complete, start to finish, "how to" to capture and share their experience with TeamBuild/ClickOnce. My goal is not only share this with other developers in our Practice, but also with the development community via CodeProject.

If/when we publish it, you can bet I'll highlight it in a post.  :)

Thursday, January 31, 2008

Finally a Supported Method to Associate a File Extension to a ClickOnce Application

Re-inventing The Wheel - How To: Add File Associations to a ClickOnce Application

"A little-known feature that made it into .NET Framework 3.5 is the ability for a ClickOnce application to be associated with document extensions. That is, once properly configured, double-clicking on a document can cause your ClickOnce application to launch. Right now, there is no direct tooling support for this feature (and if you ask me the MSDN information doesn't tell the whole story), but in this post I'll show you how you can get file associations added to your ClickOnce application.

Adding File Associations to Your ClickOnce Manifest


Adding File Associations through Visual Studio

There is no fancy UI to allow you to add file associations to your ClickOnce application in Visual Studio. It is also not possible to add the information to your application manifest after publishing, because that would invalidate the signature. So, does that mean you are forced to modify your manifest and then re-sign with mage after publishing?

Nope. When publishing in Visual Studio, it is possible to add a app.manifest file to your project. ...


You wouldn't image the hoops I jumped through to fake out/pretend/sort-of kind-of create a file extension association to a .Net 2.0 ClickOnce app (it's ugly, but it works... ).

Now in .Net 3.5 we have official support (and it looks like it's pretty easy too). Yeah!

Just one MORE reason to move to 3.5.  :)

Sunday, December 02, 2007

Nice Things to Know about ClickOnce

Martha Amirzadeh's Blog (Mahta) - What you should know about ClickOnce deployment

"During past couple months I had a chance to work on ClickOnce deployment in WPF and I have started reading many articles on this topic. These are couple of must know details about ClickOnce that I am going to share here.

How ClickOnce Performs Application Updates


Providing a User Interface for Updates

Using this strategy, the application developer provides a user interface that allows the user to choose when or how often the application will check for updates. For example, you might provide a "Check for Updates Now" menu item, or an "Update Settings" dialog box with choices for different update intervals. The ClickOnce deployment APIs (System.Deployment.Application namespace) provides a framework for programming your own update user interface.


Some nice snips of information and tips about ClickOnce. The one that struck me was the "Providing a User Interface for Updates" topic. That's something I always wanted to add to me ClickOnce app's. (also the Size Limitations was "interesting" information...)

Friday, June 01, 2007

ClickOnce Publish with TeamBuild

Tim Hibbard - Publishing a ClickOnce app with TeamBuild

"After much frustration, I've finally configured our TeamBuild proj file to publish our ClickOnce app, and increase the version number (kinda an important step).  The Vertigo blog talks about using SolutionToPublish, but that doesn't work for all situations.  Specifically, when your solution contains projects that reference other projects. 

So I started playing with the MSBuild Community Tasks Project, and came up with the following Xml for my proj file:


Another background "want" I've had is to ClickOnce publish via TeamBuild. I guess if you wait long enough... (and read enough blog posts... ;)

Tuesday, March 13, 2007

CORK (ClickOnce Community Resource Kit) Moves to CodePlex

.Net Ramblings Brian Noyes' Blog - ClickOnce Community Resource Kit has found a new home

"For those of you looking for the ClickOnce Community Resource Kit I wrote for the Patterns and Practices Smart Client Software Factory team, you may have found that it has disappeared from its old location on GotDotNet.


The download for my ClickOnce Community Resource Kit can be found here:"

We'll be seeing these moves from GDN to other repositories allot in the coming months...

Related Past Post XRef:
CORK - ClickOnce community Resource Kit

Monday, December 04, 2006

App Updater Component & Windows 2003 / IIS6

Some background first...

I'm a pretty big fan of things that make the lives of my users (and thereby my own) easier. One of those things is automatic application updating. For my internally released app's I don't want my users to worry about version numbers, if they have the latest, checking their emails/feeds for new versions, etc. I want the app to let them know there's a new version and to make it painless for them to get it.

For .Net 2.0, ClickOnce goes a good ways toward satisfying this... It's not perfect, but so far, for the production apps I've used it on, it's gotten the job done.

For .Net 1.x, I've been using the AppUpdater Component (.NET Client Applications: .NET Application Updater Component) and have been happy with it. It's not as cool or good as ClickOnce, but it's way better than nothing...

And now today's story...

In the past few months I've been moving all our auto-updating apps from Win2K to Win2k3. The ClickOnce ones went first and today it was time to do a new AppUpdater Component based app release.

Which gacked. Bad. It didn't work, wouldn't download the files, etc.


Long story short, remember IIS6 is locked down by default. AND that the AppUpdater Component uses WebDAV and that *.config files are mapped/locked down.

Once I enabled WebDAV, and removed *.config from the mapped extensions I was gold...

Check out these posts for more information on this and how to resolve it.
Appupdater Woes......
Setting up the AppUpdater Component to work with Windows Server 2003

Related Past Post XRef:
Updater Application Block V2
GotDotNet User Sample: AppUpdater Extended

Friday, November 03, 2006

CORK - ClickOnce community Resource Kit

patterns & practices - Smart Client Software Factory: Downloads: Home - ClickOnce Community Resource Kit

"Deploying client applications with ClickOnce requires a lot of procedural steps to accomplish and there are many variations in the way development organizations want to manage their deployments. This ClickOnce Community Resource Kit contains over 70 pages of written guidance and How-To topics that will lead you through common scenarios. Accompanying the written guidance is a Manifest Manager Utility sample that will make it easier to accomplish those steps through a custom tool. This tool also provides sample code for how to program against the ClickOnce manifest APIs to create other custom tools for manipulating manifests beyond what Visual Studio and the SDK tools support. There is also guidance and a sample implementation for putting a custom server repository source for your ClickOnce application files using SQL Server. This material, written by IDesign architect Brian Noyes, author of Smart Client Deployment with ClickOnce (, will help get you up and running with ClickOnce deployment quickly. You can contact Brian at" [Content Leached in full]

I made that up, CORK, but I like it so I'm going to use it... ;)

While the 66 page PDF focuses on ClickOnce and CAB, it also contains a good bit of additional great ClickOnce information. If this is the kind of stuff we're going to see in Brian's ClickOnce book, then I'm glad I have it on my Amazon wish list... :)

(via Eugenio Pace - patterns & practices Client Architecture Guidance - ClickOnce, CAB and SCSF)

Thursday, October 05, 2006

"Administering ClickOnce Deployments"

Administering ClickOnce Deployments

"Summary: ClickOnce provides an easy-to-use and flexible deployment mechanism for smart client applications built for the .NET Framework 2.0. ClickOnce offers end-user deployment, ready-made installation dialogs, a built-in security model, and automatic or on-demand updates. But while it's great to have so many built-in features, one area that users often request more control is in tracking who uses which applications, controlling access to those applications, and knowing when something goes wrong. You may just need to keep track of who is using which versions of each application at the user level. You may want to restrict access to certain applications and updates based on a user's identity or their association with a role or group. You may want to know when launch errors have occurred for particular users so that you can troubleshoot deployment problems if they exist.

This whitepaper discusses all of these scenarios...


Publishing and Deploying a ClickOnce Application
Installing and Launching a ClickOnce Application

Tracking ClickOnce Application Usage
Using Windows Authentication
Using Custom Application Authentication
Using Query String Parameters
Using a Custom Client Proxy to Establish an Application Session
User Authentication Summary

Limiting Access to ClickOnce Applications
Using Windows Authorization Custom Authorization
Using Query String Parameters
Using a Custom Client Proxy User Authorization Summary

Dealing with Launch Errors


Additional Resources

Publish Directory Structure
Setting and Changing the Deployment Provider"

What interested me in this article was the "Tracking ClickOnce Application Usage" topic...

I've been thinking of tracking who installs my internal ClickOnce apps so I know who I'll be supporting, who to ask for feedback, etc. I was thinking of baking it into each app, but doing it externally would be much cooler and easier to reuse...

Wednesday, June 07, 2006

"Authoring a Custom Bootstrapper Package for Visual Studio 2005"

MSDN - Authoring a Custom Bootstrapper Package for Visual Studio 2005

"Summary: This article discusses how to integrate a custom application prerequisite into the Visual Studio 2005 Bootstrapper, allowing other developers to deploy the prerequisite with their applications. (8 printed pages)
The Visual Studio 2005 Generic Bootstrapper

The Visual Studio 2005 Bootstrapper is a technology that allows you to create an integrated setup experience for application prerequisites and ClickOnce or Windows Installer installations. With the Bootstrapper you do not have to worry whether or not end users have components like MDAC or the .Net Framework 2.0 installed on their machines-simply indicate which prerequisites your application depends on and the Bootstrapper will take care of installing them along with the application itself.

Visual Studio 2005 includes out-of-the-box capability to install several common prerequisites using the Bootstrapper, including .NET Framework 2.0, SQL Server Express 1.0, and others. The Bootstrapper is completely extensible, so it can be configured to install just about any redistributable. As a redistributable owner, providing a means for developers to seamlessly install your package with their application using the Bootstrapper promotes penetration of your redistributable, and simplifies servicing by providing an alternative to privately deploying assemblies in the redistributable.

This whitepaper will show how to integrate a custom application prerequisite with the Bootstrapper. This will allow other developers to deploy the prerequisite along with their applications.
I’ve been looking for a good technical article on creating my own bootstrap package.

Looks like I found it..

(via Chris Smith's completely unique view - Authoring a Custom Bootstrapper Package for Visual Studio 2005)

Monday, June 05, 2006

Delta Based File Compression from MS for Windows (Beta)

Delta Compression Application Programming Interfaces

"Delta Compression is a differential compression technology developed by Microsoft. While it has mainly been used for Windows Updates, Delta Compression offers other uses as well. The following topics discuss Delta Compression Application Programming Interfaces (APIs) currently available in the Windows Platform.

C-Language based API that allows you to create and apply deltas.
Lower computational overhead than MSDelta but typically creates larger deltas.
Applies to:
   Microsoft® Windows XP®
   Windows 2000®
   Windows Server 2003®
   Windows Vista®

C-Language based API that allows you to create and apply deltas. MSDelta offers optimization for a much larger range of file types than PatchAPI.
Applies to:
   Microsoft Windows Vista

This documentation is intended for software developers who want to programmatically create deltas (patches or compressed diffs) between files. General information about the various APIs is included in this documentation. It provides information about delta compression and the Delta Compression APIs. This documentation provides descriptions of the functions as well as supplemental information for developers who want to optimize the size of their deltas for certain file types.
The MS Delta made me chuckle... Raise your hand if you ever used MS Delta (the predecessor to SourceSafe) [Hand Raised]

In any case, these API’s look interesting. It would be cool see something like this built into one of the auto app update methods (App Update block, ClickOnce, etc).

Saturday, May 20, 2006

ClickOnce Production Deployment - Step by Step

.NET Ramblings - Brian Noyes’ Blog - Manually Putting a ClickOnce Application into Production

"A common question with respect to ClickOnce is how to take an application that you have published and tested on your local machine or a local development server and move that application into production. The steps involved are not particularly complex, but do involve using some other tools to get it done and are not easy to figure out on your own unless you have a solid understanding of ClickOnce manifests, signing, and how they relate to the launch mechanisms of ClickOnce.

Brian has posted a cool step by step guide for taking your ClickOnce from Local/Dev/QA and moving it to Production, using mageui.exe.

Technorati Tags: ,

Monday, May 08, 2006

Doing ClickOnce? Think About Adding Your Project's *.user to Your Version Control

AppDev: Something You Should Know by Irena Kennedy - SYSK 121: When it’s Not Only Acceptable, but Recommended to Check into Source Control Your .user File

"Developer’s personal settings and preferences are stored in a .user file.This is why it’s not recommended to add .user files to VSS or other Source Control tool - keep personal to yourself.


However, when using ClickOnce deployment, the published version is stored in YourExeProject.csproj.user.So, if you don’t check this file into VSS, when somebody else (or you on another computer) will do the ClickOnce publishing to the deployment server, the version number will restart from zero!Needless to say, that will mess up your versioning… You could manually enter the version you want, but many don’t... So, if you’re using ClickOnce with version auto-increment, do add your csproj.user file to the solution and check it into Source Control tool." (Post leached in full. Please click through to discuss on Irene’s blog...)

Nice tip. And important now that I’m building (and soon deploying/puplishing) on different machines

TFS follows the best practice and doesn’t auto-magically add *.user project files, so you’ll have to do it manually...

Thursday, May 04, 2006

"Configuring Team Foundation Build to Create a Visual Studio Setup Project"

Rob Caron - Configuring Team Foundation Build to Create a Visual Studio Setup Project

"There’s a new draft topic on the Team System User Education blog for your review. It provides a procedure for creating an MSBuild task to build a Visual Studio setup project using Team Foundation Build. Please take a look at it, if possible - try it, and then provide any feedback you may have in the comments of the article...."

Looks like Rob has given me my "Weekend TFS Project" task...

Automated setup building is one of the next logical steps for my Team Builds (the next being automating ClickOnce publishing).

Technorati Tags: , ,