Problem with .application manifest, seems dependency/dependentAssembly/assemblyIdentity attribute version not updated consistently
-
Thursday, February 10, 2011 9:16 PM
I've been struggling for quite some time trying to figure out why my clickonce install will sometimes update the application on the client computer and sometimes not. I believe I have it narrow down to the attribute "dependency/dependentAssembly/assemblyIdentity attribute version" as shown in the .application fie below.
It seems that the version number is not updating consistently (or at least in my universe). Basically, if I publish directly to IIS using the PublishUrl as the localhost itself on my dev box, the version attribute gets updated everytime. If I publish instead to a directory with msbuild (or even with vs directly) sometimes the attribute gets updated and sometimes not. Below is my .application as well as a simple msbuild commandline that has the random behavior of sometimes updating and sometimes not.
msbuild proj1.csproj /target:publish /property:PublishUrl="d:\a" /property:ApplicationRevision=204 /property:ApplicationVersion="1.0.0.204"
I believe what I want to happen is the version below to always come out to version="1.0.0.204"
<dependency> <dependentAssembly dependencyType="install" codebase="Application Files\ClickOnceFail_1_0_0_204\ClickOnceFail.exe.manifest" size="7661"> <assemblyIdentity name="ClickOnceFail.exe" version="1.0.0.111" publicKeyToken="19dc826e220b6301" language="neutral" processorArchitecture="x86" type="win32" /> <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>eRX2gyZi3Gi49EsvbsYz9ksr6h8=</dsig:DigestValue> </hash> </dependentAssembly>
Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider
All Replies
-
Friday, February 11, 2011 1:28 AMThe problem appears to be that in msbuild /target:publish, the manifest is not being regenerated if the assembly is updated after a normal visual studio build/all.
Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider -
Friday, February 11, 2011 7:27 AMModerator
Hi pkellner,
MSBuild /target:publish does not have the build, assemble actions. So it does not generate the manifest. For MSBuild, it defines three tasks we can use to generate a ClickOnce deployment, they are GenerateApplicationManifest, GenerateDeploymentManifest and GenerateBootstrapper. (for please refer to: http://msdn.microsoft.com/en-us/library/ms171466.aspx) Please try to configure the MSBuild script and build to generate the Application Manifest and Depolyment Manifest.
Hope this helps.
Sincerely,
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

- Marked As Answer by Bob_BaoMVP, Moderator Monday, February 21, 2011 2:04 AM
-
Friday, February 11, 2011 7:38 AM
I'm still a little confused. I think the root of my problem is that I have a step in my build process where I obfuscate my assemblies. Essentially, after I've done a full rebuild of my project, I have a process that obfuscates in place all the exe and dll's in my bin/release directory. At this point, I want publish to pick up those files and push them to a clickonce location. Will this work? I don't want msbuild ../target:publish to attempt to generate a new binaries because it will overwrite my obfuscated ones.
Am I thinking about this correctly? I'm new to this and don't really grock the complete build process, what gets hashed, etc. so please correct me if I'm wrong or suggest a better way. The goal is to get my obfuscated assemblies in my clickone deployment (including my .exe)
thanks.
Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider -
Saturday, February 12, 2011 2:24 AM
Hi Bob,
I've successfully generated the application and deployment manifests following the above articles. I'm a little lost on how to create the Bootstrapper. Is there a way to get the syntax out of visual studio 2010 for how it created the bootstrapper? Any pointers would be appreciated.
Peter Kellner http://peterkellner.net Microsoft MVP • ASPInsider -
Monday, February 14, 2011 9:44 AMModerator
Hi pkellner,
Please take a look at the following blog: http://codeprairie.net/blogs/chrisortman/archive/2008/04/16/using-msbuild-to-create-a-bootstrapper-for-you-installer.aspx and this project may help you on generating the Bootstrapper: http://code.msdn.microsoft.com/bmg
Sincerely,
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
Friday, July 15, 2011 5:20 PMHave you found a way to update the assembly identity version? I've also tried setting the property from the command line using /property:ApplicationVersion = x.x.x.x with no success. Thanks!


