vb.net VB Visual Studio 不更新 bin/debug 文件夹

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23250578/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 17:27:14  来源:igfitidea点击:

VB Visual Studio doesn't update the bin/debug folder

vb.netvisual-studio-2010

提问by Numeri says Reinstate Monica

A friend was working on a Visual Basic program in Visual Studio 2010 (Express) and all of a sudden, after the code is changed or the form is modified, Visual Studio refuses to update the program when we go to debug/build it. It doesn't update the "MyAppName".exe at all.

一位朋友正在Visual Studio 2010 (Express) 中编写Visual Basic 程序,突然,在更改代码或修改表单后,Visual Studio 在我们调试/构建程序时拒绝更新程序。它根本不更新“MyAppName”.exe。

I tried following the accepted answer to thisquestion, which suggests deleting all the content in the bin/debug/ folder, but when I try to build his program, it simply repopulates these files:

我尝试按照问题的已接受答案进行操作,该答案建议删除 bin/debug/ 文件夹中的所有内容,但是当我尝试构建他的程序时,它只是重新填充这些文件:

  • MyAppName.vshost.exe.config
  • MyAppName.exe.config
  • MyAppName.vshost.exe
  • MyAppName.vshost.exe.config
  • 我的应用程序名称.exe.config
  • MyAppName.vshost.exe

(I made sure I had closed VS prior to deleting, so that all the files were removed.)

(我确保在删除之前关闭了 VS,以便删除所有文件。)

If you press F5or the debug button, VS complains:

如果您按下F5或 调试按钮,VS 会抱怨:

Visual Studio cannot start debugging because the debug target 'C:\PATH_TO_PROJECT\bin\debug\MyAppName.exe' is missing...

Visual Studio 无法开始调试,因为缺少调试目标“C:\PATH_TO_PROJECT\bin\debug\MyAppName.exe”...

and so on.

等等。

Any help?

有什么帮助吗?

回答by Chad Dienhart

Here are the steps in VS2010:

以下是VS2010中的步骤:

Step 1: Build -> Clean Solution This will delete all the build output files

第 1 步:Build -> Clean Solution 这将删除所有构建输出文件

Step 2: Build -> Rebuild Solution Rebuilds everything. Note: Build solution only builds the projects that Visual Studio determines need to be built (which is why you are not seeing all files updated). Visual Studio gets this wrong sometimes.

第 2 步:构建 -> 重建解决方案 重建一切。注意:构建解决方案仅构建 Visual Studio 确定需要构建的项目(这就是为什么您没有看到所有文件更新的原因)。Visual Studio 有时会出错。

enter image description here

在此处输入图片说明

You can check to see if you are build configuration via Build -> Configuration Manager.

您可以通过 Build -> Configuration Manager 检查您是否正在构建配置。

回答by Nikita

In my case root of cause was bad one of the project, that was used in many other projects. I fixed it and resolve all issues.

在我的情况下,根本原因是项目中的一个错误,该项目已用于许多其他项目。我修复了它并解决了所有问题。