简体   繁体   English

由于缺少文件,Visual Studio 2010错误构建

[英]Visual Studio 2010 error building, due to missing files

I've searched everywhere and I can't seem to find anyone with the same problem (although I'm sure people have made the same mistake in the past)...I accidentally deleted the contents of my Debug and Release folders. 我到处搜索,似乎找不到任何有相同问题的人(虽然我确定人们在过去犯了同样的错误)...我不小心删除了我的Debug和Release文件夹的内容。 Now I am getting file not found errors. 现在我收到文件未找到错误。 As a background, it's a Windows Forms Application in C#, and I'm running Visual Studio 10. 作为背景,它是C#中的Windows窗体应用程序,我正在运行Visual Studio 10。

Here's the errors: 这是错误:

Unable to read manifest 'bin\Debug\projectName.vshost.exe.manifest' 
Could not find file [pathName]\projectName.vshost.exe.manifest.

Before I was missing the manifest, I was getting an error that it could not find the other contents of the folder (the exe, the pdb, etc.), error MSB3113 ( link ) 在我错过清单之前,我收到一个错误,它无法找到该文件夹​​的其他内容(exe,pdb等),错误MSB3113( 链接

Things I've tried (and some of them were far-fetched, I know): 我尝试过的事情(其中一些是牵强附会,我知道):

  • I tried renaming bogus files for all the missing files 我尝试为所有丢失的文件重命名伪造文件
  • I tried to find the deleted files, but can't 我试图找到已删除的文件,但不能
  • I tried deleting all the contents of the Debug/Release folders and doing a clean build 我尝试删除Debug / Release文件夹的所有内容并进行干净的构建
  • I tried deleting the Debug/Release directories 我尝试删除Debug / Release目录

Let me know if you can think of anything I could try out. 如果你能想到我能尝试的任何东西,请告诉我。 My issue seems to be vaguely similar to this one . 我的问题似乎与这个问题模糊不清。

Here's how I ended up solving the problem - turns out I included my bin and obj directories in my project. 这是我最终解决问题的方法 - 结果我在我的项目中包含了我的binobj目录。 For anyone experiencing the same problem, simply right click and "Exclude From Project." 对于遇到相同问题的任何人,只需右键单击并“从项目中排除”。 After doing this, clean and rebuild your project, and you should be good to go. 完成此操作后,清理并重建您的项目,您应该很高兴。

In my case the file app.manifest was checked-out. 在我的情况下,文件app.manifest已签出。 This file is located in my Winforms project under Properties folder. 此文件位于Properties文件夹下的Winforms项目中。 I selected this file from Pending Changes window and did "undo pending checkout". 我从Pending Changes窗口中选择了此文件并执行了“撤消待处理结帐”。 After that the build succeeded. 之后构建成功。 This happened in Visual Studio 2008. 这发生在Visual Studio 2008中。

为我工作:属性=>构建=>生成序列化程序集=>从自动更改为关闭

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM