我正在尝试手动调用Installer.Install :
ProjectInstaller installer = new ProjectInstaller();
installer.Install(new Dictionary<int, int>());
问题:
System.ArgumentException was unhandled.
The value "_reserved_lastInstallerAttempted" is not of type "System.Int32"
and cannot be used in this generic collection.
at System.ThrowHelper.ThrowWrongKeyTypeArgumentException(Object key, Type targetType)
at System.Collections.Generic.Dictionary`2.System.Collections.IDictionary.Add(Object key, Object value)
at System.Configuration.Install.Installer.Install(IDictionary stateSaver)
at CSShellExtContextMenuHandler.ProjectInstaller.Install(IDictionary stateSaver) in C:\Users\win7pro32bit\Documents\lab\CSShellExtContextMenuHandler\ProjectInstaller.cs:line 40
at Starter.Program.Main(String[] args) in C:\Users\win7pro32bit\Documents\lab\Starter\Program.cs:line 14
作为参数,我尝试了new Dictionary<int, int>
,new Dictionary<string, string>
和其他参数,但没有一个有效。该文档没有帮助。期望什么?