Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS 2017 Metadata file '.dll could not be found [duplicate]

I know there is another question with exact the same problem, but I went trough all those answers, and none helped me. :( (This was the question.)

I just created a new ASP.NET MVC project and joined a few '.dll's in the solution. Now when I try to build the project I get the error message shown below on 3 of the 5 libraries.

Error   CS0006  Metadata file 'C:\Users\...\source\Database\bin\Debug\DataAccessLayer.dll' could not be found   Logic   C:\Users\...\source\Logic\CSC   1   Active  Error   CS0006  Metadata file 'C:\Users\...\source\Logic\bin\Debug\Logic.dll' could not be found    PTS2-MVC    C:\Users\...\source\PTS2-MVC\CSC    1   Active  Error   CS0006  Metadata file 'C:\Users\...\source\PTS2-MVC\bin\PTS2-MVC.dll' could not be found    PTS2-MVC.Tests  C:\Users\...\source\PTS2-MVC.Tests\CSC  1   Active 

When I go to the bin\debug folder of that .dll, I see that it is empty, and the other .dll where I do not get an error message, is not empty. But I am clueless how to fix this or what I did to make this happen.

The most common answer is to go to the properties of the solution and go to configuration and uncheck -> apply -> check and apply again, but that didn't work

like image 889
Svenmarim Avatar asked May 29 '17 22:05

Svenmarim


People also ask

How do I open a DLL file in Visual Studio 2017?

You can easily open a DLL file in Visual Studio the same way you would any other file. To do so, click File in the menu bar at the top, followed by Open. Then click File and select the DLL file you want to open and click Open. This will open the DLL file in a new Resource Editor window.

Where can I find Entityframework DLL?

The file that needs to be edited is in the “C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes” directory.

What is metadata file in C#?

Metadata refers to binary information saved in memory or a language runtime portable executable file. When you compile code from a portable executable file, data is added to another file section. The code is converted to MSIL (Microsoft Intermediate Language) before moving to another file partition.


2 Answers

The problem was that I had some other normal error messages in my project, and apparently after I fixed those and when I cleaned and built my project AGAIN, then all .dlls succeeded.

Make sure you don't have any other error messages in your project and if you do, fix those first!

like image 107
Svenmarim Avatar answered Sep 18 '22 11:09

Svenmarim


Steps in Fixing this Error: MetaData File .dll could not be found.

  1. Clean All Projects.

  2. Unload All Projects.

  3. Reload All Projects.

  4. ReBuild Solution.

Then problem solved.

like image 26
rjay dadula Avatar answered Sep 16 '22 11:09

rjay dadula