Start Updating assemblyinfo

Updating assemblyinfo

A repeating question among MSBuild developers is if you should extend the files generated by visual studio with new stuff, or whether you should write your own containing your home-made MSBuild scripts.

It should be a no-brainer (just copy a shortcut in the startup folder, right?

) but when you add Vista to the mix all hell breaks loose (and when I say “all hell breaks loose” I mean nothing happens at startup.) I finally sat down this weekend and put together a sample application and some documentation to support my findings. The main goal is to determine a reliable, reusable way to add Auto Start functionality to any Click Once deployed application for any Windows operating system. An application shortcut is copied to the Start Menu Programs directory as part of the installation process for a Click Once application which is configured to be available offline.

For example, for me on Vista, the attached sample application’s shortcut is placed in the following location: C:\Users\Ben Griswold\App Data\Roaming\Microsoft\Windows\Start Menu\Programs\Ben Griswold\Click Once Auto Start.appref-ms.

This way, you avoid updating an auto-generated file which you don’t have control over. The root element of an MSBuild XML file will always be a project containing target elements.

In other words, there is no configuration setting to enable the Click Once application to run at startup.

There are two sited ways to implement run at startup functionality.

From Windows Vista, MSBuild is distributed with Windows itself, making it a strong platform for implementing scripted application on non-developer PCs as well. NET 2.0, application were built by one or more of these strategies: The drawback with the first two strategies was that they were hard to script.