We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Missing assemblyRSS

1 reply

Last post Mar 13, 2018 02:05 AM by Yuk Ding

  • Missing assembly

    Mar 12, 2018 11:42 PM|quarinteen___|LINK

    I have an asp app with C# back end. running .net 4.5. I am using  System.DirectoryServices.AccountManagement; and it compiles and runs fine straight out of VS, but when I publish it and go to the page I get an error 

    Compilation Error
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0234: The type or namespace name 'AccountManagement' does not exist in the namespace 'System.DirectoryServices' (are you missing an assembly reference?)

    Source Error:

    Line 5: using System.Net;
    Line 6: using System.Globalization;
    Line 7: using System.DirectoryServices.AccountManagement;
    Line 8: /// <summary>
    Line 9: /// Summary description for ldapThirty

    I have never seen this out side of VS. The reference is in the project. I am using 2017. I see there is an option to copy local, but I cant find it. Any help would be appreciated. 

  • Re: Missing assembly

    Mar 13, 2018 02:05 AM|Yuk Ding|LINK

    Hi quarinteen,

    This issue occur because your system.directoryservices.accountmanagement.dll is not copied to the local bin folder. So you need to set copy to local=true in reference's properties.

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.