使用Domain对象运行程序时出错

时间:2013-08-29 00:35:25

标签: c# .net-assembly

我有这个库:

Microsoft.GroupPolicy;

这段代码:

GPDomain domain = new GPDomain("MyDomain");
Console.WriteLine(domain.DomainName);

运行代码时出现此消息错误:

Could not load file or assembly 'Microsoft.GroupPolicy.ServerAdminTools.GpmgmtLib, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its 
dependencies. The system cannot find the file specified.

关于如何解决我的问题的任何想法?

1 个答案:

答案 0 :(得分:0)

缺少Microsoft.GroupPolicy.ServerAdminTools.GpmgmtLib.dll

Installing the GPMC Class Library

并在win8上试试这个  Install the GPMC