Metadata file '.dll' could not be found
I just had the same problem. Visual Studio isn't building the project that's being referenced.
Written Instructions:
- Right click on the solution and click Properties.
- Click Configuration on the left.
- Make sure the check box under "Build" for the project it can't find is checked. If it is already checked, uncheck, hit apply and check the boxes again.
- (Optional) You had to do it for both Release and Debug modes on the solution properties.
Screen capture Instructions:
- They say a picture is worth a thousand words. Click on the GIF to zoom in, and hopefully it will be easy to follow:
VS 2017 Metadata file '.dll could not be found
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!
Metadata file '.dll' could not be found
I just had the same problem. Visual Studio isn't building the project that's being referenced.
Written Instructions:
- Right click on the solution and click Properties.
- Click Configuration on the left.
- Make sure the check box under "Build" for the project it can't find is checked. If it is already checked, uncheck, hit apply and check the boxes again.
- (Optional) You had to do it for both Release and Debug modes on the solution properties.
Screen capture Instructions:
- They say a picture is worth a thousand words. Click on the GIF to zoom in, and hopefully it will be easy to follow:
Visual studio - getting error Metadata file 'XYZ' could not be found after edit continue
Eventually what solved the issue was:
- Clean every project individually (Right click> Clean).
- Rebuild every project individually (Right click> Rebuild).
- Rebuild the startup project.
I guess for some reason, just cleaning the solution had a different effect than specifically cleaning every project individually.
Edit:
As per @maplemale comment, It seems that sometimes removing and re-adding each reference is also required.
Update 2019:
This question got a lot of traffic in the past, but it seems that since VS 2017 was released, it got much less attention.
So another suggestion would be - Update to a newer version of VS (>= 2017) and among other new features this issue will also be solved
VS2017 Metadata file '.dll' could not be found
I tracked the issue down to a specific NuGet package that has not yet been updated for visual studio 2017. (Baseclass.Contrib)
It isn't yet registered as having updates available through the nuget package manager, but you can manually update using the nuget console and running this command Install-Package Baseclass.Contrib.Nuget.Output -Version 2.3.0-vs20172
Related Topics
Check Whether Internet Connection Is Available with C#
What Is the Async/Await Equivalent of a Threadpool Server
Converting String to Double in C#
What Use Is the Aliases Property of Assembly References in Visual Studio 8
Creating a Zip Archive in Memory Using System.Io.Compression
Automatically Set Appsettings.JSON for Dev and Release Environments in ASP.NET Core
Differencebetween a Mutable and Immutable String in C#
Get the Ip Address of the Remote Host
Turn a Simple C# Dll into a Com Interop Component
Stopwatch VS. Using System.Datetime.Now for Timing Events
No Overflow Exception for Int in C#
How Does Native Implementation of Valuetype.Gethashcode Work
How to Call an Async Method in Main
C# "Parameter Is Not Valid." Creating New Bitmap
Entity Framework Refresh Context