I use MsBuild to Registry a VS Addin.
I need implement target Uninstall in MSBuild.
How can I delete my addin path in SOFTWARE\Microsoft\VisualStudio\9.0\AutomationOptions\LookInFolders registry using MsBuild ?
For install, I use
<Target Name="RegistryExtensions">
<Message Text="Registry AddIn..."></Message>
<Registry.Set
RegistryHive="LocalMachine"
Key="SOFTWARE\Microsoft\VisualStudio\9.0\AutomationOptions\LookInFolders"
Value="$(ProgramFiles)\LifeCycle\AddIns"
DataType="String" />
<Message Text="Adding LifeCycle.targets to VisualStudio SafeImports ..."></Message>
<Registry.Set
RegistryHive="LocalMachine"
Key="SOFTWARE\Microsoft\VisualStudio\9.0\MSBuild\SafeImports"
Value="MyLifeCycle"
DataType="String"
Data="$(MSBuildExtensionsPath)\LifeCycle.targets" ContinueOnError="true">
</Registry.Set>
</Target>
<Target Name="UnRegistryAddin">
<!-- TODO -->
</Target>
I try get the value, but I get Empty string
<Registry.GetKey
RegistryHive="LocalMachine"
Key="SOFTWARE\Microsoft\VisualStudio\9.0\AutomationOptions\LookInFolders"
Value="$(ProgramFiles)\LifeCycle\AddIns">
<Output TaskParameter="Data" PropertyName="Addin1"/>
</Registry.GetKey>
<Message Text=" Addin1 $(Addin1)" />