Changes are not happening until a rebuild is performed
Asked Answered
D

6

7

I have a large windows application.

Recently when I make any change in the source code and run the project normally with or without debug, the changes are not made.

I tried to rebuild it, and everything goes fine, now every change I made to the source code I have to rebuild the project then run it so that the changes are taking effect.

also I can't debug until I rebuild the solution.

my project is attached to source safe control.

any help is appreciated.

Disappointment answered 19/2, 2011 at 7:27 Comment(2)
Yeah, you normally have to rebuild a project before your code changes take effect. That hasn't changed, and it's true in just about every compiled language. Also, what is "debi"?Exhale
I'd assume that "debi" is "debug".Ralleigh
G
12

You frequently see this happen when a project gets deselected from the "Current Build Configuration" Dialog in visual studio. Try checking there to see if your project is unchecked. I think you can get to that menu by clicking the dropdown that says Debug/Release, and clicking manage/edit.

Godwit answered 19/2, 2011 at 7:41 Comment(1)
You can also get to that screen by right clicking on your solution and selecting Configuration Manager, or by looking for Configuration Manager under the Build menu.Herbst
B
2

This is an old question but I happened to face a similar challenge. Well, for the benefit of someone who may experience the same here is how my problem was solved. I had a multi-project solution where some project depended on the source code from the other projects. Just before giving up and continue with the rebuild thing, I decided to check on the Build Dependencies=>Project Dependencies(Right-Click on the project). I found that the problematic code was from a Class Library that was not part of the dependencies(Unchecked). When I Included the project in the dependencies my problem vanished into thin air.

Boles answered 13/10, 2016 at 21:22 Comment(0)
P
1

If you are referencing a .dll whose code is in another project you will need to build the project before the changes are reflected even if both projects are in same solution. sadly there is no running away from it.

Pamalapamela answered 19/2, 2011 at 7:30 Comment(6)
This isn't just true if you're referencing a DLL. When you make changes to source code within a single project, you have to rebuild it before your changes take effect.Exhale
I don't understand the context you are taking about.. even if you hit F5 the code is obviously Rebuild so where does the thing come as not building at all. What i said was for building a project but not being able to see changes of project2 as that has not been build exclusively.. you can however build your whole solutionPamalapamela
Not if you turn that off. It's totally possible to press F5 and have Visual Studio launch the last built executable, rather than build a new one. No one can tell from the question what's going on, but you can't just assume that by "rebuild" he doesn't mean "rebuild".Exhale
Yeah..I that case OP need to clarify things. :)Pamalapamela
Dear, Thanks for your help, I was changing some settings in my project. I realized that recently I changed the target platform of the build process to Any CPU, I put it back to be x86 and everything went to normal. Do you think this might be the problem, I don't see a connection between these two things.Disappointment
well this is strange as i don't know of any connection between this setting and your problem.Pamalapamela
P
0

Go to your configuration Manager and make sure build checkbox is selected for your project.

other thing you can try is: Go to tools > Options>> A window will pop up> Under Project and Solutions > select Build and Run

Make sure Before building is set to Save all changes

(Copied from answer by amit dayama at https://mcmap.net/q/1478099/-solution-doesnt-run-build-rebuild-in-visual-studio)

Posset answered 23/11, 2016 at 13:18 Comment(0)
A
0

I have faced the same problem because I have done some unsafe modifications upon the project names and have used find/replace upon the solution. Which resulted in a hidden exception in the android manifest file and exactly at the package name.

  • I avoid all types of headaches, I have created a new blank project with the desired name and namespaces and then moved the functional files, resource files and then modified static files like manifest and so on.

  • Never use unsafe method for project data configuration & modification

Amon answered 5/9, 2020 at 0:9 Comment(0)
B
0

I had the same problem. The Winforms application project was set to x86 and the dependency class library (inside the same solution) was x86, then changed to "Any CPU" and had to manually rebuild.

In the Application project (the one I was manually rebuilding), go to > Properties > Build > Set to "Any CPU" (the exact build as dependency).

Solved.

Bindle answered 6/6, 2023 at 12:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.