A simple tool I developed at work for me and my colleagues should be made available using the Clickonce feature of Microsoft. As it is a Windows Presentation Foundation application and will only be available for our team of about 10 people, this will be the ideal deployment option. It is easy to install and updates to the application will be available immediately to everyone. As my company still uses network shares for file management, the deployment location will be an UNC path.
The configuration and publishing process was straight forward. Everything worked as expected and as soon as I clicked the „Publish Now“ button, the files get copied to the UNC path specified. Wow, this is really super easy! The installation of the application however failed, stating that the application cannot be started and that one should contact the application vendor.
Reason and solution
The detailed error description (which is actually a file that opens in notepad) was not really helpful. When looking at the „Operation progress status“ I found out that the processing of the application manifest was successful and that a compatible runtime (.NET Framework) was found, too. The ArgumentException with the message „Value does not fall within the expected range“ however was not useful at all.
I suddenly had the idea to copy the whole directory to my laptop and try the installation again. This actually worked. Afterwards I realized that there are „hash“ (#) characters in the network path. So I copied the directory to an UNC path that does not contain any special characters at all. This also worked. I assume that the hash would have been the reason for the installation to fail.
I don’t think it’s really clever to have hash characters in an UNC path. Nevertheless, the error description could have been much more explanatory, which would have saved me at least half an hour.