L
Linda Liu[MSFT]
Hi Stewart,
Thank you for your prompt reply!
You're right.
In the Microsoft.Common.targets file, you can see that the
GenerateManifests target is sequenced after the BeforePublish target in the
DependsOn list of the PublishOnly target. It looks as if the ClickOnce
manifests would be re-generated after the BeforePublish target is built.
But the fact is that the GenerateManifests will be skipped if the ClickOnce
manifests have been created and the number of the input files is not
changed.
After doing some research, I find that only when the Project Designer is
opened and the Publish tab is selected, the AfterCompile target will be
built for multiple times when you publish the application via Publish
Wizard. Please switch to other tabs than the Publish tab within the Project
Designer or close the Project Designer directly and right click the project
in Solution Explorer and choose Publish command to publish the application.
Alternatively, you can publish the application using MSBuild command in
VS05 Command Prompt.
To summary, use AfterCompile target to apply dotfuscate to the executable
assembly and re-sign this assembly if it is strong-named. Then publish the
application using Publish Wizard or msbuild command in the VS05 Command
Prompt. When using Publish Wizard, remember not to select the Publish tab
in the Project Designer when publishing.
Hope this helps.
If you have any question, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
Thank you for your prompt reply!
It does not regenerate the manifest files after the BeforePublish target.
You're right.
In the Microsoft.Common.targets file, you can see that the
GenerateManifests target is sequenced after the BeforePublish target in the
DependsOn list of the PublishOnly target. It looks as if the ClickOnce
manifests would be re-generated after the BeforePublish target is built.
But the fact is that the GenerateManifests will be skipped if the ClickOnce
manifests have been created and the number of the input files is not
changed.
After doing some research, I find that only when the Project Designer is
opened and the Publish tab is selected, the AfterCompile target will be
built for multiple times when you publish the application via Publish
Wizard. Please switch to other tabs than the Publish tab within the Project
Designer or close the Project Designer directly and right click the project
in Solution Explorer and choose Publish command to publish the application.
Alternatively, you can publish the application using MSBuild command in
VS05 Command Prompt.
To summary, use AfterCompile target to apply dotfuscate to the executable
assembly and re-sign this assembly if it is strong-named. Then publish the
application using Publish Wizard or msbuild command in the VS05 Command
Prompt. When using Publish Wizard, remember not to select the Publish tab
in the Project Designer when publishing.
Hope this helps.
If you have any question, please feel free to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support