问题
I am trying to write a custom actions class library for my WiX install package. I've read that I should use CustomActionAttribute to mark the methods that I am planning to call from install package. There is no Votive plugin for VS2010, so when I type [CustomAction] above my method name, VS2010 doesn't find it. So what should I do to write a custom action method?
回答1:
There is Voitve support for Visual Studio 2010 in Wix 3.5 and up. With Votive you get a project template for creating managed custom actions which will set up all of the dependencies you need to add the CustomAction attribute.
You can add a reference to the Microsoft.Deployment.WindowsInstaller.dll to resolve the reference manually, but the project template sets up a few more needed steps to create the CA.
回答2:
From this and other blog posts Rob has made, I thought WiX v3.5's Votive had VS2010 support, just not out of the box (last minute ship-decision?). Someone correct me if I'm wrong.
来源:https://stackoverflow.com/questions/5516054/dont-have-any-customactionattribute-in-vs2010