Q:

Error launching .NET application compiled to target 'Any CPU'

I have a .NET application that is shared to around 30 different computers, (mix of 32-bit and 64-bit machines).
When compiled, the application is set to target 'Any CPU'.
It runs fine on all machines except one that is Windows 7 64 bit.
The error message is:

Following errors were detected during this operation.  * [11/2/2011
  8:59:40 AM] System.ArgumentException
    - Value does not fall within the expected range.
    - Source: System.Deployment

After researching, I found that if I change the target CPU to 64-bit it runs fine on the problem machine, but will not run on the 32-bit computers.
Is there a fix for this?
Stack trace:
- Stack trace:
    at System.Deployment.Internal.Isolation.IStore.LockApplicationPath(UInt32 Flags, IDefinitionAppId ApId, IntPtr& Cookie)
    at System.Deployment.Application.ComponentStore.LockApplicationPath(DefinitionAppId definitionAppId)
    at System.Deployment.Application.SubscriptionStore.LockApplicationPath(DefinitionAppId definitionAppId)
    at System.Deployment.Application.FileDownloader.PatchFiles(SubscriptionState subState)
    at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
    at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
    at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
    at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
    at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
    at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

A:

A highly relevant thread found on MSDN forum is ClickOnce Fails with "Value does not fall within the expected range."

