Error CS0006 Metadata file could not be found RRS feed

  • Question

  • Good morning,

    This is my first question here. I found this problem in many companies. Sometimes even if I made lot of effort some DLLs files cannot be loaded. Usually I made steps such like:

    • Clean and rebuild projects,
    • Unload and load projects,
    • Delete '.vs', 'bin' and 'obj' folder and restart Visual Studio in administration rights,
    • Reinstall all NuGet packages,
    • Delete and add new references,
    • Clean cache,
    • Switch from Debug to Release version,
    • Change platform from x86 to x64.

    But even if all that effort sometimes I cannot manage to integrate all projects and Error CS0006 appear when I am building all my projects.

    What else can I do to resolve this problem?

    Thank you in advance,

    Wednesday, November 25, 2020 1:18 PM

All replies

  • Hello,

    • First thing to check, are the DLL from NuGet compatible with the .NET Framework for your project?
    • Report the issue to Microsoft (see below)

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    My GitHub code samples
    GitHub page

    Check out:  the new Microsoft Q&A forums

    Wednesday, November 25, 2020 2:51 PM
  • Hi Peter,
    Please follow the steps below to check if it is helpful to you.
    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.
    Best Regards,
    Daniel Zhang

    "Visual c#" forum will be migrating to a new home on Microsoft Q&A ! We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A ! For more information, please refer to the sticky post.

    Thursday, November 26, 2020 2:40 AM