Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Click Once Installation Problems
 

Click Once Installation Problems

hi everbody, this is to help other stuck in same ClickOnce problems

background:we make a ClickOnce Application which supports some communicationfeatures. As our own classes wont support all parameters (like ssl, certs,..)we decide to include use a commercial communication library. First installed their Trial, included their references, coded some communications and come to test: all worked properly, so we choosed to deploy a release ClickOnce version, then following happend:

when downloading on clients followed error #1 (see below, meaning "manifest is invalid or file not found") occured, after contacting support we purchased the commercial version of the lib and we goterror #2 this time (see below, meaning „length can’t be less then 0 (null)�/span>)

so we stuck, and after analyses we checked out:
THE USED COMPONENTS WERE OBFUSCATED
after contacting producersupport and suggesting about thiswe got some 'better' libswhich make no problems when downloading with ClickOnce.
we made reproducable errors, when creating 3 empty winform ClickOnce applications, one without the libs, onereferencing (NOT USING!)trial, one referencing (NOT USING) with commercial. currently producer is investigating.

sorry for some english misspellings. but it costs some time to detect it, and i hope others got now faster solution!


error #1:
....
FORTSCHRITTSSTATUS DES VORGANGS
* [22.09.2009 14:14:18] : Die Aktivierung von C:\Dokumente und Einstellungen\XXXXXX\Desktop\XXXXX.application wurde gestartet.
* [22.09.2009 14:14:20] : Das Verarbeiten des Bereitstellungsmanifestes wurde erfolgreich abgeschlossen.
* [22.09.2009 14:14:20] : Die Installation der Anwendung wurde gestartet.
* [22.09.2009 14:14:20] : Das Verarbeiten des Anwendungsmanifestes wurde erfolgreich abgeschlossen.
* [22.09.2009 14:14:22] : Die Anforderung der Vertrauensstellung und die Ermittlung der Plattform sind abgeschlossen.

FEHLERDETAILS
Folgende Fehler wurden bei diesem Vorgang entdeckt.
* [22.09.2009 14:14:24] System.Deployment.Application.InvalidDeploymentException (ManifestLoad)
- Ausnahme beim Laden des Manifests aus der Datei 'XXXXXXXX.dll': Das Manifest ist möglicherweise ungültig, oder die Datei konnte nicht geöffnet werden.
- Quelle: System.Deployment
- Stapelüberwachung:
bei System.Deployment.Application.Manifest.AssemblyManifest.ManifestLoadExceptionHelper(Exception exception, String filePath)
bei System.Deployment.Application.Manifest.AssemblyManifest.LoadFromInternalManifestFile(String filePath)
bei System.Deployment.Application.Manifest.AssemblyManifest..ctor(String filePath)
bei System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
bei System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
bei System.Deployment.Application.FileDownloader.OnModified()
bei System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
bei System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
bei System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
bei System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
bei System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
bei System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
bei System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
bei System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Interne Ausnahme ---
System.Deployment.Application.DeploymentException (InvalidManifest)
- Ein internes Manifest kann nicht aus der Komponentendatei geladen werden.
- Quelle:
- Stapelüberwachung:


DETAILS ZUR SPEICHERTRANSAKTION DER KOMPONENTE
Es sind keine Transaktionsinformationen verfügbar.



error #2:
...
FORTSCHRITTSSTATUS DES VORGANGS
* [22.09.2009 14:24:41] : Die Aktivierung von C:\Dokumente und Einstellungen\XXXXXX\Desktop\XXXXXXX.application wurde gestartet.
* [22.09.2009 14:24:42] : Das Verarbeiten des Bereitstellungsmanifestes wurde erfolgreich abgeschlossen.
* [22.09.2009 14:24:42] : Die Installation der Anwendung wurde gestartet.
* [22.09.2009 14:24:43] : Das Verarbeiten des Anwendungsmanifestes wurde erfolgreich abgeschlossen.
* [22.09.2009 14:24:44] : Die Anforderung der Vertrauensstellung und die Ermittlung der Plattform sind abgeschlossen.

FEHLERDETAILS
Folgende Fehler wurden bei diesem Vorgang entdeckt.
* [22.09.2009 14:24:49] System.ArgumentOutOfRangeException
- Die Länge darf nicht kleiner als 0 (null) sein.
Parametername: length
- Quelle: mscorlib
- Stapelüberwachung:
bei System.String.CtorCharArrayStartLength(Char[] value, Int32 startIndex, Int32 length)
bei System.Deployment.Application.AssemblyMetaDataImport.ConstructAssemblyName(IntPtr asmMetaPtr, Char[] asmNameBuf, UInt32 asmNameLength, IntPtr pubKeyPtr, UInt32 pubKeyBytes, UInt32 flags)
bei System.Deployment.Application.AssemblyMetaDataImport.ImportIdentity()
bei System.Deployment.Application.AssemblyMetaDataImport.get_Name()
bei System.Deployment.Application.Manifest.AssemblyManifest.LoadFromCompLibAssembly(String filePath)
bei System.Deployment.Application.Manifest.AssemblyManifest.LoadFromInternalManifestFile(String filePath)
bei System.Deployment.Application.Manifest.AssemblyManifest..ctor(String filePath)
bei System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
bei System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
bei System.Deployment.Application.FileDownloader.OnModified()
bei System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
bei System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
bei System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
bei System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
bei System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
bei System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
bei System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
bei System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

DETAILS ZUR SPEICHERTRANSAKTION DER KOMPONENTE
Es sind keine Transaktionsinformationen verfügbar.


Chris

Chris Täubler  Thursday, September 24, 2009 11:05 AM
Can you please translate that to English and re-post it?


You said you purchased some 3rd party dll's and are including them. How are you including them? Are they installed in your GAC and you are just adding a reference to it and setting copy-local to true? Or are you actually adding the dll's to your project and setting a reference to the included files and setting copy-local to true?

Do you know that you can simply deploy the dll's locally and it will work, or do they have to be installed in the GAC?

If you build it and then go to the \bin folder and run the exe, does it work?

If you then take that bin folder and copy it to a machine that you have not installed the components on and try to run it, does it work (if not, they have to be installed in the GAC)?

Thanks,
RobinDotNet
Click here to visit my ClickOnce blog!
RobinDotNet  Friday, September 25, 2009 2:42 AM
Hi Robin

i added translated (see below, but raw translated), source of exceptions is .NET Framework (i tried to set my local language to english to get english exception, but doesnt work.)

i tested with following vendor versions, errors are ONLY occuring during ClickOnce installation.

1) with Trial Version (direct referenced from installation dir of vendor) -> error #1
2) with Trial Version (referencing copied binaries) -> error #1
3) with Trial Version (no installation, referencing copied binaries) -> error #1

then we purchased:

4) with Full Version (direct referenced from installation dir of vendor) -> error #2
5) with Full Version (referencing copied binaries) -> error #2
6) with Full Version (no installation, referencing copied binaries) -> error #2

the direct references come from GAC, copied ones are from filesystem, one having installed vendors product, one from filesystem without installed vandor products.

ALL VERSIONs ARE WORKING LOCALLY FINE, ALSO A COPY OF RELEASE DIRECTORY WORKS FINE ON OTHER MACHINES (SO NO GAC relation necessary i think)

So from my sight, it was just the obfuscation tool (vendor using) which breaks the ClickOnce Installation, i also told vendor about MSDN articles (ClickOnce and obfuscation) about resign after obfuscation, but currently no feedback.

fact is, after receiving new DLLs (i think not obfuscated, thats what i want from vendor - ildasm now show other content(names)) ClickOnce works also fine.

if u give me a email -> i can send u all testprojects and testlinks, which i made to replicate the failure.

Chris

error # 1:
....
PROGRESS STATUS
* [22.09.2009 14:14:18]: Activation of C: \ Documents and Settings \ XXXXX \ Desktop \ XXXXX.application started.
* [22.09.2009 14:14:20]: Processing of deployment manifest has successfully completed.
* [22.09.2009 14:14:20]: Installation of application has started.
* [22.09.2009 14:14:20]: Processing of application manifest has successfully completed.
* [22.09.2009 14:14:22]: Request of trust and detection of platform is complete.

ERROR DETAILS
The following errors were detected during this operation.
* [22.09.2009 14:14:24] System.Deployment.Application.InvalidDeploymentException (ManifestLoad)
- Exception loading manifest from file 'XXXXXXXX.dll': The manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.ManifestLoadExceptionHelper (Exception exception, String filePath)
at System.Deployment.Application.Manifest.AssemblyManifest.LoadFromInternalManifestFile (String filePath)
at System.Deployment.Application.Manifest.AssemblyManifest .. ctor (String filePath)
sender, System.Deployment.Application.DownloadManager.ProcessDownloadedFile (Object, DownloadEventArgs s)
sender, System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke (Object, DownloadEventArgs s)
at System.Deployment.Application.FileDownloader.OnModified ()
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile (DownloadQueueItem) next
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles ()
at System.Deployment.Application.FileDownloader.Download (SubscriptionState) subState
subState at System.Deployment.Application.DownloadManager.DownloadDependencies (SubscriptionState, assembly manifest deployManifest, assembly manifest appManifest, Uri sourceUriBase, Directory String target, String group, IDownloadNotification notification, download Options options)
transactionId at System.Deployment.Application.ApplicationActivator.DownloadApplication (SubscriptionState subState, ActivationDescription actDesc, Int64, TempDirectory & downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication (SubscriptionState & subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation (Uri activationUri, Boolean isShortcut, textualSubId String, String deploymentProviderUrlFromExtension, Browser settings browser settings, String & errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker (Object) state
--- Inner Exception ---
System.Deployment.Application.DeploymentException (InvalidManifest)
- An internal manifest can not be loaded from the component file.
- Source:
- Stack trace:


COMPONENT STORE TRANSACTION DETAILS
There are no transaction information is available.



error # 2:
...
PROGRESS STATUS
* [22.09.2009 14:24:41]: Activation of C: \ Documents and Settings \ XXXXX \ Desktop \ XXXXXXX.application started.
* [22.09.2009 14:24:42]: Processing of deployment manifest has successfully completed.
* [22.09.2009 14:24:42]: Installation of application has started.
* [22.09.2009 14:24:43]: Processing of application manifest has successfully completed.
* [22.09.2009 14:24:44]: Request of trust and detection of platform is complete.

ERROR DETAILS
The following errors were detected during this operation.
* [22.09.2009 14:24:49] System.ArgumentOutOfRangeException
- The length must not be less than 0 () is zero.
Parameter name: length
- Source: mscorlib
- Stack trace:
at System.String.CtorCharArrayStartLength (Char [] value, Int32 startIndex, Int32 length)
at System.Deployment.Application.AssemblyMetaDataImport.ConstructAssemblyName (asmMetaPtr IntPtr, Char [] asmNameBuf, UInt32 asmNameLength, pubKeyPtr IntPtr, UInt32 pubKeyBytes, UInt32 flags)
at System.Deployment.Application.AssemblyMetaDataImport.ImportIdentity ()
at System.Deployment.Application.AssemblyMetaDataImport.get_Name ()
at System.Deployment.Application.Manifest.AssemblyManifest.LoadFromCompLibAssembly (String filePath)
at System.Deployment.Application.Manifest.AssemblyManifest.LoadFromInternalManifestFile (String filePath)
at System.Deployment.Application.Manifest.AssemblyManifest .. ctor (String filePath)
sender, System.Deployment.Application.DownloadManager.ProcessDownloadedFile (Object, DownloadEventArgs s)
sender, System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke (Object, DownloadEventArgs s)
at System.Deployment.Application.FileDownloader.OnModified ()
at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile (DownloadQueueItem) next
at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles ()
at System.Deployment.Application.FileDownloader.Download (SubscriptionState) subState
subState at System.Deployment.Application.DownloadManager.DownloadDependencies (SubscriptionState, assembly manifest deployManifest, assembly manifest appManifest, Uri sourceUriBase, Directory String target, String group, IDownloadNotification notification, download Options options)
transactionId at System.Deployment.Application.ApplicationActivator.DownloadApplication (SubscriptionState subState, ActivationDescription actDesc, Int64, TempDirectory & downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication (SubscriptionState & subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation (Uri activationUri, Boolean isShortcut, textualSubId String, String deploymentProviderUrlFromExtension, Browser settings browser settings, String & errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker (Object) state

COMPONENT STORE TRANSACTION DETAILS
There are no transaction information is available.
Chris Täubler  Friday, September 25, 2009 7:47 AM

You can use google to search for other answers

Custom Search

More Threads

• Installing product from MsiInstallProduct API
• Windows attempts to launch installer when another user starts the installed application
• VS2005 Deployment Project - OneClick Install
• Clickonce not autoupdating
• click once deploy
• Click-Once apps generate 'The memory could not be "read".' when run
• Problem adding files to deployment project.
• Detecting .NET 3.0 installation
• File Download - Security Warning
• How to call custom action on button click