Wednesday, 6 December 2017

c# - Metadata file '.dll' could not be found

itemprop="text">

I am working on a WPF, C# 3.0 project,
and I get this error:



Error 1
Metadata file
'WORK=-
\Tools\VersionManagementSystem\BusinessLogicLayer\bin\Debug
\BusinessLogicLayer.dll'
could not be found C:\-=WORK=-
\Tools
\VersionManagementSystem\VersionManagementSystem\CSC
VersionManagementSystem



This
is how I reference my
usercontrols:



xmlns:vms="clr-namespace:VersionManagementSystem"
Margin="5"/>


It
happens after every failed build. The only way I can get the solution to compile is to
comment out all my user controls and re-build the project, and then I uncomment the
usercontrols and everything is
fine.




I have checked build orders and
dependencies configurations.



As you can see, it
seems to 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 to
comment, build, and uncomment, the build is becoming extremely
tiresome.



Answer




I just had the same problem. Visual Studio
isn't building the project that's being
referenced.



Written
Instructions:





  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 it can't find is checked. If it is already checked, uncheck, hit
    apply and check the boxes again.

  4. (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:



href="https://i.stack.imgur.com/F3Cs3.gif" rel="noreferrer"> src="https://i.stack.imgur.com/F3Cs3.gif" alt="Gif
Instructions">


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...