I have WinForms application that are deployed through ClickOnce. I have Post Build Event that signs my assemblies with SignTool. I publish application as ClickOnce installer and I see in VS output that files are signed, but after install there is no signed assemblies. How I can sign assemblies that will be included to ClickOnce package?
-
1Read "#2: Signing the application executable post-build" --> robindotnet.wordpress.com/2013/02/24/…Mate– Mate2015-03-12 00:05:59 +00:00Commented Mar 12, 2015 at 0:05
-
I do exactly this, but files are not signedname1ess0ne– name1ess0ne2015-03-12 02:36:21 +00:00Commented Mar 12, 2015 at 2:36
-
1Verify "obj" directory ( for VS2013 try "$(ProjectDir)obj\$(ConfigurationName)\$(TargetFileName)" ) and check the log on VS output view.Mate– Mate2015-03-12 02:43:00 +00:00Commented Mar 12, 2015 at 2:43
-
Thanks a lot! Finally I did that!!! You are right, the problem was because I signed assembly in bin/Release folder, not in obj! Also I set AfterCompile target, because I had problems with application manifest with BeforePublish target.name1ess0ne– name1ess0ne2015-03-12 04:07:15 +00:00Commented Mar 12, 2015 at 4:07
-
Great! Mark your answer as correctMate– Mate2015-03-12 18:33:32 +00:00Commented Mar 12, 2015 at 18:33
Add a comment
|
2 Answers
Thanks to Mate
Finally I did that! I added target to *.cproj file as mentioned in article here
It looks like:
<Target Name="AfterCompile">
<Exec Command=""C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\SignTool.exe" sign /f cert.pfx /p your_password /v "$(ProjectDir)obj/$(ConfigurationName)/$(TargetFileName)"" />
</Target>
There is signed *.exe file in the obj directory. Also I use AfterCompile target, because I had problems with application manifest when tryed BeforePublish target.

