简体   繁体   English

为什么我的视觉工作室无法正常构建?

[英]Why doesn't my visual studio build properly?

Okey, I am REALLY having problems with the Visual Studio 2012, and looked all over for a solution, with no result. Okey,我的Visual Studio 2012确实有问题,并且四处寻找解决方案,但没有结果。

So the problem is this... Usually the play button, starts building and debugging in the end running the program. 因此,问题就在于此...通常,播放按钮会在开始运行程序时开始构建和调试。 And each time a source file is updated, it should do that again. 每次更新源文件时,都应再次执行此操作。 Well, for me it does not. 好吧,对我来说不是。 Every time I write something new in a file, I need to REBUILD the program and then hit play, when before, just hitting the F5 button would do the trick. 每次我在文件中写入新内容时,都需要重新构建程序,然后点击播放,在以前的版本中,只需按下F5按钮就可以解决问题。

The thing is, I have checked, all probable causes that were diagnosed over the internet, so no it's not related to the settings in visual studio, and no, it's not a timestamp issue. 事实是,我已经检查了所有通过互联网诊断出的可能原因,所以不,它与Visual Studio中的设置无关,不,这不是时间戳记问题。

The oddest thing though, is that sometimes, some of the files inside the project look excluded( they have a tiny red circle on them and I have to select and reinclude them). 不过,最奇怪的是,有时项目中的某些文件看起来被排除了(它们上有一个小红圈,我必须选择并重新包含它们)。 I do not understand why that happens, they were not implemented by me, they are just some "dependency" files on which other classes that I am ussing are built. 我不明白为什么会发生这种情况,它们不是由我实现的,它们只是我正在使用的其他类所构建的一些“依赖”文件。

Furthermore, the problem of not updating the program. 此外,还有不更新程序的问题。 At the moment I have 2 classes. 目前,我有2节课。 If I write code inside one of them, F5 will work properly and run with the expected modified result. 如果我在其中之一中编写代码,F5将正常工作并以预期的修改结果运行。 On the other class though, nothing will happen. 但是,在另一类上,什么也不会发生。 F5 will find no errors, but it will run without any modification, altough there was code added in one of the classes. F5不会发现任何错误,但是可以在没有任何修改的情况下运行,尽管在其中一个类中添加了代码。

This is really driving me crazy, and I really need a conclusive answer. 这确实使我发疯,并且我确实需要一个明确的答案。 Why are the dependencies file being involuntarely excluded? 为什么不自愿排除依赖项文件? Why does visual Build correctly changes from one file but not from another? 为什么Visual Build可以正确地从一个文件更改而不能从另一个文件更改?

You made your visual studio to do it (ie to launch code with errors). 您使Visual Studio做到了这一点(即,启动有错误的代码)。

By default when there is an error you get this popup: 默认情况下,发生错误时,您会收到以下弹出窗口:

在此处输入图片说明

Now if you tick the checkbox - VS will not bother asking you again; 现在,如果您选中复选框-VS不会再打扰您了; even when errors occur - it will just execute last executable that it has. 即使发生错误-它也只会执行它拥有的最后一个可执行文件。

To revert this change - go to: Tools > Options > Project & Solutions > Build & Run: 要还原此更改,请转至:工具>选项>项目与解决方案>构建并运行:

在此处输入图片说明

Change this setting to *Prompt to Launch and you are done. 将此设置更改为*提示启动 ,即可完成。

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

相关问题 C ++ Visual Studio无法正确构建 - C++ visual studio doesn't build properly 为什么我的代码在 Visual Studio 中不起作用? - Why doesn't my code work in visual studio? 为什么Visual Studio无法编译我的QT项目,因为它找不到库? - Why can't Visual Studio compile my QT Project because it doesn't find the libraries? Visual Studio 调试器在调试中无法正确显示 std::string - Visual Studio debugger doesn't display std::string properly in debug 为什么我的Visual Studio 2013 Ultimate没有MPI群集调试器? - Why my Visual Studio 2013 Ultimate doesn't have MPI Cluster Debugger? 为什么Microsoft Visual Studio不允许我选择项目目的地? - why microsoft visual studio doesn't let me choose my project destination? 为什么我的visual studio 2k8 C ++项目不能使用Unicode字符? - Why doesn't my visual studio 2k8 C++ project work with unicode characters? DLL 项目未在 Visual Studio 2019 中构建 - DLL project doesn't build in Visual Studio 2019 Visual Studio在运行之前不会构建应用程序 - visual studio doesn't build application before running it 我当前的代码没有在 MS Visual Studio 中正常运行? - My current code isn’t running properly in MS Visual Studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM