元数据文件......构建项目时无法找到错误 [英] Metadata file ... could not be found error when building projects
问题描述
每次启动 Visual Studio 2008 时,第一次尝试运行项目时都会收到错误 CS0006 The metadata file ... could not be found.如果我重建完整的解决方案,它会起作用.
Every time I start Visual Studio 2008, the first time I try to run the project I get the error CS0006 The metadata file ... could not be found. If I do a rebuild of the complete solution it works.
关于解决方案的一些信息:
Some information about the solution:
我在调试模式下构建,Visual Studio 抱怨在发布文件夹中找不到 dll:s.
I'm building in debug mode and Visual Studio complains about not finding dll:s in the release folder.
Visual Studio 抱怨的项目被解决方案中的许多其他项目使用.
The projects Visual Studio complains about are used by many other projects in the solution.
我已将所有项目的默认输出路径分别更改为......\build\debug\ProjectName 和......\build\release\ProjectName.(只是为了将所有构建文件放在一个目录中)
I have changed the default output path of all projects to a ......\build\debug\ProjectName and ......\build\release\ProjectName respectively. (Just to get all build files in one directory)
我在另一个解决方案中遇到了同样的问题.
I have the same problem with a another solution.
解决方案是从头开始创建的.
The solution was created from scratch.
解决方案中有 9 个项目.一个 WPF 和 8 个使用 dotnet 3.5 的类库.
There are 9 projects in the solution. One WPF and 8 class libraries using dotnet 3.5.
对导致此问题的原因有任何想法吗?
Any ideas on what is causing this problem?
推荐答案
我遇到了找不到元数据"的类似问题.在解决方案属性上,确保为每个项目在 Build/Configuration Manager 中标记构建"复选框.
i had the similar issue where "metadata could not be found". on the solution property, make sure that the "build" check box is marked in Build/Configuration Manager for each project.
这篇关于元数据文件......构建项目时无法找到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!