#742 Build error when referencing System.Management


When building for .NET 4.0 and the csc task includes a reference to System.Management.dll the build fails with:

[csc] c:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Management.dll: error CS1703: An assembly with the same identity 'System.Management, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references.
[csc] c:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Management.dll: (Location of symbol related to previous error)


  • Eberhard Beilharz

    Simple build file that shows the problem

  • Eberhard Beilharz

    The reason it fails is a typo in NAnt.exe.config where System.Management.dll is misspelled. See patch #3023707 for a fix.

  • Ryan Boggs

    Ryan Boggs - 2010-07-04

    Thanks for the report Eberhard. I commited the fix and confirmed that it works with the test you sent it. It will be in 0.91 Alpha2.

  • Ryan Boggs

    Ryan Boggs - 2010-07-04
    • assigned_to: nobody --> rmboggs
    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks