none
Error CS0006_Metadata file could not be found. RRS feed

  • Question

  • Hi,

    When I compile my C# project i am getting the below errors:

    Error 1.

    Error CS0006 Metadata file 'E:\Code\EMR\EMRCS\Debug\UIControl.dll' could not be found EMRCS E:\Code\EMR\EMRCS\CSC 1 Active

    Error 2.
    Error CS0006 Metadata file 'E:\Code\EMR\UIControl\EnergyUsageManager\bin\Debug\EnergyUsageManager.dll' could not be found EMRCS E:\Code\EMR\EMRCS\CSC 1 Active

    Error 3.
    Error CS0006 Metadata file 'E:\Code\EMR\UIControl\EMRLogger\bin\Debug\EMRLogger.dll' could not be found EMRCS E:\Code\EMR\EMRCS\CSC 1 Active

    Error 4.
    Error CS0006 Metadata file 'E:\Code\EMR\UIControl\WebserverRequest\bin\Debug\WebserverRequest.dll' could not be found EMRCS E:\Code\EMR\EMRCS\CSC 1 Active

    For Your Information,

    For Error 1, In the below path of the project "UIControl.dll" is not there
    E:\Code\EMR\EMRCS\bin\Debug

    And also i verified that "build" checkbox is checked from Solution ->Configuration Properties

    Please help me the root cause of these errors.

    Regards,

    Satya

    Tuesday, August 14, 2018 5:39 AM

Answers

  • Hi Satya,

    Make sure that the "build" check box is marked in the following location:

    1. Right click on the solution and click Properties.
    2. Click Configuration on the left.
    3. Make sure the check box under "Build" for the project is checked. If check then uncheck and check again and save the settings.
    4. Clean the solution by right clicking on the project solution and rebuild the project again.
    5. Make sure you don't have any other error messages in your project and if you do, fix those first!


    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Tuesday, August 14, 2018 9:44 AM
    Moderator

All replies

  • The other metafile error are caused by the first error, which caused the project cannot be compiled.

    Try ask whoever handing the project to you where the UIControl.dll is and add reference to the first project, and see if it compiles. Rinse and repeat.

    Tuesday, August 14, 2018 6:22 AM
    Answerer
  • Hi,

    Thank you for the Information.

    I found UIControl.dll in the below path.

    E:\Code\EMR\UIControl\UIControl\Debug

    I am new to C# development. Here I am trying to give this library path to the C# project. How to give this path?

    And also how to add the reference to the project?

    Regards,

    Satya

    Tuesday, August 14, 2018 6:37 AM
  • Hi,

    I have added the reference from 

    Add -> Reference, and selected UIControl.dll from the path "E:\Code\EMR\UIControl\UIControl\Debug"

    but still i am getting those errors.

    And when i go back and checked, in the reference manger dialog, under "Browse" tab "UIControl.dll" is showing as unchecked.

    Regards,

    Satya

    Tuesday, August 14, 2018 6:45 AM
  • Try ask your collegue for help.

    There is certainly something missing from your solution that prevents it from compiling. And no need to "Add reference" to UIControl.dll as the behavior you see suggested that it's one of the output of another project in the solution.

    Check the build order and try to build the first project in that first. Build it one by one until you find the project that is missing or have problem in compilation.

    Tuesday, August 14, 2018 7:26 AM
    Answerer
  • I have migrated the C# project from Visual Studio 2008 to Visual Studio 2017. And there is only one project in the solution.

    When i go and see Properties -> Application -> Target framework: it is showing .Net Framework 2.0

    But now i migrated to VS 2017. Do I need to change the version here? And Is the issue is due to the wrong version?

    And if i have to change the version, can i select the latest version?
    Tuesday, August 14, 2018 7:41 AM
  • Hi Satya,

    Make sure that the "build" check box is marked in the following location:

    1. Right click on the solution and click Properties.
    2. Click Configuration on the left.
    3. Make sure the check box under "Build" for the project is checked. If check then uncheck and check again and save the settings.
    4. Clean the solution by right clicking on the project solution and rebuild the project again.
    5. Make sure you don't have any other error messages in your project and if you do, fix those first!


    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Tuesday, August 14, 2018 9:44 AM
    Moderator
  • satya i'll trying but can not solve 
    Tuesday, March 10, 2020 12:10 PM
  • an other 
    Tuesday, March 10, 2020 12:10 PM
  • you are right but cannot solve me problem 
    Tuesday, March 10, 2020 12:14 PM
  • I have followed that 5 step instruction but could not solve the issue. :(
    Monday, September 14, 2020 10:41 AM