I have a clickonce application. I need to register COM visible dll for that application. I used registration in the code of that application that checks if this was already registered and registers it by RegistrationServices class method RegisterAssembly(). It works fine if it is was launched by administrator. But I can't require administrator rights to deploy clickonce application. The second way I tried to register is prerequisite for my clickonce that will require administrator and will register my dll. I had created product manifest for my prerequisite application, but I got an error during the clickonce deployment
"Setup has detected that the file '...' has either changed since it was initially published or may be corrupt."
I figured out that this is the problem of .NET 4.5 and I should sign my prerequisite. I signed it and generated manifest by Bootstrapper again. After that I got the following error during the deployment:
"File not trusted Error: Setup has detected that the publisher of file cannot be verified"
I had to install the certificate on the target machine first before I could successfully deploy my clickonce. But it won't be possible to install certificate before installing clickonce on all target machines. Does anybody have any ideas how to resolve this issue? Thanks in advance.