Dumitru Radu
Dumitru Radu

Reputation: 37

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.

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.

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.

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. If I write code inside one of them, F5 will work properly and run with the expected modified result. 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.

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?

Upvotes: 1

Views: 1445

Answers (1)

Artur
Artur

Reputation: 7267

You made your visual studio to do it (i.e to launch code with errors).

By default when there is an error you get this popup:

enter image description here

Now if you tick the checkbox - VS will not bother asking you again; 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:

enter image description here

Change this setting to *Prompt to Launch and you are done.

Upvotes: 1

Related Questions