Metadata File '

Error 1 Metadata file"WORK=- ToolsVersionManagementSystemBusinessLogicLayerinDebugBusinessLogicLayer.dll" could not be found C:-=WORK=- ToolsVersionManagementSystemVersionManagementSystemCSC VersionManagementSystemThis is how I reference my usercontrols:

xmlns:vms="clr-namespace:VersionManagementSystem"It happens after every failed build. The only way I can get the solution lớn compile is to comment out all my user controls & re-build the project, và then I uncomment the usercontrols and everything is fine.

Bạn đang xem: Metadata file '

I have sầu checked build orders & dependencies configurations.

As you can see, it seems to lớn have truncated the DLL file"s absolute path... I have read that there is a bug with the length. Is this a possible problem?

It"s very annoying and having lớn phản hồi, build, & uncomment, the build is becoming extremely tiresome.

c# .net wpf visual-studio-2008 c#-3.0
Improve this question
edited Atruyền thông quảng cáo 19 "18 at 14:08

Peter Mortensen
28.9k2121 gold badges9696 silver badges123123 bronze badges
asked Sep 14 "09 at 14:19

32.1k1111 gold badges5656 silver badges7070 bronze badges
| Show 4 more comments

99 Answers 99

Active Oldest Votes
234 Next
I just had the same problem. Visual Studio isn"t building the project that"s being referenced.

Written Instructions:

Right clichồng on the solution and cliông chồng Properties.Cliông chồng 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 và check the boxes again.(Optional) You had to vị it for both Release và Debug modes on the solution properties.

Screen capture Instructions:

They say a picture is worth a thousvà words. Cliông chồng on the GIF to zoom in, and hopefully it will be easy khổng lồ follow:


Improve this answer
edited Oct 3 "19 at 7:33

26.8k1111 gold badges9090 silver badges6969 bronze badges
answered Jul 18 "13 at 12:42

12.7k22 gold badges2525 silver badges4040 bronze badges
| Show 40 more comments
This can still happen in newer versions of Visual Studio (I just had it happen on VisualStudio2013):

Another thing to lớn try is lớn cthua kém Visual Studio and delete the .suo file that is next to the .sln file. (It will be re-generated the next time you Save sầu all (or exit Visual Studio)).

I"ve had this problem when adding new projects lớn the solution on another machine and then pulling the revisions in, but the .suo tệp tin can be corrupted in other cases as well và lead lớn very strange Visual Studio behaviour, so deleting it is one of the things I always try.

cảnh báo that deleting the .suo tệp tin will reset the startup project(s) of the solution.

More on the .suo file is here.

Improve sầu this answer
edited Atruyền thông quảng cáo 19 "18 at 14:29

Peter Mortensen
28.9k2121 gold badges9696 silver badges123123 bronze badges
answered Apr 22 "14 at 9:39
5,64033 gold badges2828 silver badges3131 bronze badges
I'm working with Xamarin project và the .suo tệp tin is located in the .vs/ folder . I tried deleting it & it didn't solve my problem
Feb 27 "16 at 13:43
| Show 7 more comments
The suggested answer did not work for me. The error is a decoy for another problem.

I found out that I was targeting a slightly different version of .NET và this was flagged as a warning by the compiler, but it was causing building to lớn fail.This should have sầu been flagged as an error và not a warning.

Improve this answer
edited Apr 19 "18 at 15:15
Peter Mortensen
28.9k2121 gold badges9696 silver badges123123 bronze badges
answered Dec 15 "15 at 21:15
jordan koskeijordan koskei
2,53911 gold badge1313 silver badges1212 bronze badges
| Show 8 more comments
Well, my answer is not just the summary of all the solutions, but it offers more than that.

Xem thêm: Phim Ván Bài Tình Yêu Tập 10 Trực Tiếp Trên Thvl1 Ngày 7/7, Giới Thiệu Phim Ván Bài Tình Yêu Tập 10

Section (1):

In general solutions:

I had four errors of this kind (‘metadata file could not be found’) along with one error saying "Source File Could Not Be Opened (‘Unspecified error ‘)".

I tried to get rid of ‘metadata file could not be found’ error. For that, I read many posts, blogs, etc. and found these solutions may be effective (summarizing them over here):

Restart Visual Studio và try building again.

Go to lớn "Solution Explorer". Right click on Solution. Go khổng lồ Properties. Go khổng lồ "Configuration Manager". Cheông xã if the checkboxes under "Build" are checked or not. If any or all of them are unchecked, then kiểm tra them và try building again.

If the above solution(s) vì chưng not work, then follow sequence mentioned in step 2 above, và even if all the checkboxes are checked, uncheck them, check again and try lớn build again.

Build Order & Project Dependencies:

Go khổng lồ "Solution Explorer". Right clichồng on Solution. Go to lớn "Project Dependencies...". You will see two tabs: "Dependencies" & "Build Order". This build order is the one in which solution builds. Chechồng the project dependencies & the build order khổng lồ verify if some project (say "project1") which is dependent on other (say "project2") is trying to build before that one (project2). This might be the cause for the error.

Cheông xã the path of the missing .dll:

Chechồng the path of the missing .dll. If the path contains space or any other invalid path character, remove it and try building again.

If this is the cause, then adjust the build order.

Section (2):

My particular case:

I tried all the steps above with various permutations and combinations with restarting Visual Studio a few times. But, it did not help me.

So, I decided khổng lồ get rid of other error I was coming across ("Source File Could Not Be Opened (‘Unspecified error ‘)").

I came across a blog post: TFS Error–Source File Could Not Be Opened (‘Unspecified error ‘)

I tried the steps mentioned in that blog post, & I got rid of the error "Source File Could Not Be Opened (‘Unspecified error ‘)" and surprisingly I got rid of other errors (‘metadata tệp tin could not be found’) as well.

Section (3):

Moral of the story:

Try all solutions as mentioned in section (1) above (và any other solutions) for getting rid of the error. If nothing works out, as per the blog mentioned in section (2) above, delete the entries of all source files which are no longer present in the source control & the tệp tin system from your .csproj file.