Metadata file '.dll' could not be found
I am working on a WPF, C# 3.0 project, and I get this error:
Error 1 Metadata file
'WORK=- ToolsVersionManagementSystemBusinessLogicLayerbinDebug
BusinessLogicLayer.dll' could not be found C:-=WORK=- Tools
VersionManagementSystemVersionManagementSystemCSC VersionManagementSystem
This is how I reference my usercontrols:
xmlns:vms="clr-namespace:VersionManagementSystem"
<vms:SignOffProjectListing 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.
I just had the same problem. Visual Studio isn't building the project that's being referenced.
This can still happen in newer versions of Visual Studio (I just had it happen on Visual Studio 2013):
Another thing to try is to close Visual Studio and delete the .suo
file that is next to the .sln
file. (It will be re-generated the next time you Save all
(or exit Visual Studio)).
I've had this problem when adding new projects to the solution on another machine and then pulling the revisions in, but the .suo
file can be corrupted in other cases as well and lead to very strange Visual Studio behaviour, so deleting it is one of the things I always try.
Note that deleting the .suo
file will reset the startup project(s) of the solution.
More on the .suo
file is here.
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 and this was flagged as a warning by the compiler, but it was causing building to fail. This should have been flagged as an error and not a warning.
链接地址: http://www.djcxy.com/p/64316.html上一篇: 访问IIS 7.0上的.asmx页时,“无法创建类型XXXX”
下一篇: 无法找到元数据文件'.dll'