Wednesday, August 11, 2010

ClickOnce: Application does not install when the time of Deployment

After running the publish wizard and running the setup.exe, a message box is shown saying that the "Application cannot be started. Contact the application vendor".
ERROR DETAILS
PLATFORM VERSION INFO 

Windows : 6.1.7600.0 (Win32NT)
Common Language Runtime : 4.0.30319.1

System.Deployment.dll : 4.0.30319.1 (RTMRel.030319-0100)
clr.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfdll.dll : 4.0.30319.1 (RTMRel.030319-0100)
dfshim.dll : 4.0.31106.0 (Main.031106-0000)
SOURCES
Deployment url : file:///G:/OFFICE/R&D/Silverlight/Examples/WPF/BackupDB/Published/BackupDB.application


Application url : file:///G:/OFFICE/R&D/Silverlight/Examples/WPF/BackupDB/Published/Application%20Files/BackupDB_1_0_0_3/BackupDB.exe.manifest
IDENTITIES
Deployment Identity : BackupDB.application, Version=1.0.0.3, Culture=neutral, PublicKeyToken=28500bade1fb75cf, processorArchitecture=msil
Application Identity : BackupDB.exe, Version=1.0.0.3, Culture=neutral, PublicKeyToken=28500bade1fb75cf, processorArchitecture=msil, type=win32
APPLICATION SUMMARY
* Installable application.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* An exception occurred while determining trust. Following failure messages were detected:
+ Value does not fall within the expected range.
* Activation of G:\OFFICE\R&D\Silverlight\Examples\WPF\BackupDB\Published\BackupDB.application resulted in exception. Following failure messages were detected:
+ Value does not fall within the expected range.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
------------------------------------------------------------
Solution:

This is Known Issue Currently and Simple workaround is don't use "&" in File path of Clickonce publish location.

Thursday, August 5, 2010

Silverlight Isolated Storage File/Directory Location

I was just building something in Silverlight that makes use of the Isolated Storage, and I uncovered a bug in Silverlight 2 Beta 2 that cause's it to crash and you are unable to write to the Isolated Storage. So, I found the location on disk where Silverlight stores the files for Isolated Storage.



Here's the file location under Windows Vista / Windows 7 where Silverlight stores the files for Isolated Storage:


C:\Users\{username}\AppData\LocalLow\Microsoft\Silverlight\is


Just replace the text "{username}" with the Windows Username of the user the data is stored for.


The bug that I ran into was also causing the Silverlight Configuration dialog (which pops up when you right click on Silverlight content within the browser) to crash when I selected the Application Storage tab. So, this bug prevented me from clearing the cache, and I wasn't able to get my app working again. I just deleted all the files within the above directory and it fixed my problem.