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
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.
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.
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.
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!
Steps in Fixing this Error: MetaData File .dll could not be found.
Clean All Projects.
Unload All Projects.
Reload All Projects.
ReBuild Solution.
Then problem solved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With