Привет. Не могу разобраться. Делаю все по инструкциям с msdn http://msdn.microsoft.com/en-us/library/ms692759(v=VS.85).aspx#Y120 - Создаю dll проект, добавляю ссылки на microsoft.managementconsole; и System.Configuration.Install; - создаю клас SimpleSnapIn.cs как в примере :
| Код | using Microsoft.ManagementConsole; using System.ComponentModel; using System; using System.Security.Permissions;
[assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Unrestricted = true)] namespace Microsoft.ManagementConsole.Samples { /// <summary> /// The RunInstaller attribute allows the .Net framework to install the assembly. /// </summary> [RunInstaller(true)] public class InstallUtilSupport : SnapInInstaller { } /// <summary> /// The main entry point for the creation of the snap-in. /// </summary> [SnapInSettings("{CFAA3895-4B02-4431-A168-A6416013C3DD}", DisplayName = "- Simple SnapIn Sample", Description = "Simple Hello World SnapIn")] public class SimpleSnapIn : SnapIn { /// <summary> /// The constructor. /// </summary> public SimpleSnapIn() { // Update tree pane with a node in the tree this.RootNode = new ScopeNode(); this.RootNode.DisplayName = "Hello World"; } } // class } // namespace
|
- компилирую - устанавливаю с Installutil.exe но получаю ошибку (скрин в файлике)
Если компилирую пример с SDK то все компилируется-устанавливается. Подозреваю какието проблемы со сборками или с настройками dll. Буду рад совету.
|