Ok, I have a very strange problem. I have a class library and I create a
windows forms application that uses it. I Publish it as a ClickOnce online
only setup. When I try to run it it fails the validation and I get:
ERROR DETAILS
Following errors were detected during this operation.
* [01/06/06 9:47:45 PM]
System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
- Reference in the manifest does not match the identity of the downloaded
assembly MyLibrary.dll.
- Source: System.Deployment
- Stack trace:
at
System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object
sender, DownloadEventArgs e)
at
System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
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)
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)
at
System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
However, if I open the manifest file, I can see:
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true"
codebase="MyLibrary.dll" size="839680">
<assemblyIdentity name="MyLibrary" version="1.0.0.0"
publicKeyToken="CD1B3EF0334774BA" language="neutral"
processorArchitecture="msil" />
<hash>
<dsig:Transforms>
<dsig:Transform
Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>utSMeQVcBCu2swZOvGyNc+YHXWI=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
And these are the EXACT identities of the assembly which I can see with
ildasm. Moreover, if I remove the .deploy and I run the application locally,
it works...
So, what gives? Why does the assembly fail validation??
Thank you,
Iulian
Iulian - 07 Jan 2006 14:49 GMT
Ok, I managed to solve it this morning... Here is what happened: the class
library was a VS2003 project converted to VS2005. The .snk file used to sign
it was an .snk file creaed with the sn.exe from framework 1.1. While nothing
seemed not to be working, still, I resigned the assembly with a VS2005
generated key file and... voila, now ClickOnce deploys and works perfectly...
Regards,
Iulian
> Ok, I have a very strange problem. I have a class library and I create a
> windows forms application that uses it. I Publish it as a ClickOnce online
[quoted text clipped - 65 lines]
>
> Iulian