开发者

Re-signing app during install vsto

I have created a fairly sim开发者_StackOverflow中文版ple Outlook AddIn and during the install I need the users to enter a couple of configuration settings. The problem I have is when it comes to the install I get an error saying that the computed hash in the manifest doesn't match (basically because I have changed some of the settings from when the dll was first built).

My question is how can I either re-sign this or get around it.


It sounds like you're embedding Application Configuration settings somewhere that they shouldn't be.

The solution is to move these configuration settings to an external configuration file and load your settings dynamically at runtime. An external configuration file will not form part of the signed assembly and therefore won't ruin your signed distribution.

It is worth noting that the .NET System.Configuration classes do not work very well with assemblies and especially badly for VSTO assemblies (see multiple problems reported here on SO: 594298). As such I would recommend that you would either roll your own configuration class or read up heavily on the ConfigurationManager.OpenMapperExeConfiguration method to override the configuration file being targeted.

Additionally If you're currently using ClickOnce then this project sounds like it would be better suited to deployment via a Windows Installer Package.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜