Visual studio does not update bin folder - visual-studio

I have a problem with visual studio 2022. I am creating a WPF app in vs 2022 version 17.2.4 using .NET 7 Preview. When I build the solution or press Start Debugging or Start Without Debugging, Visual studio won't update the compiled code(Won't replace binary files with the latest ones) and the behavior of the program won't change to correspond to the code. The problem does not persist when I press Build->Clean Solution and then Build->Build Solution. It does the same whether I build the solution with the debug or release configuration. I tried it with other solutions as well and the problem will not go away. So I know how to deal with this, but it seems weird and annoying nonetheless. It's the first time that I encounter something like this.
P.S.(Yes the solution compiles with no errors or warnings)

Related

Visual Studio debugger starts Solution build

I've designed a Visual Studio 2022 solution that contains 6 projects. One produces an executable (.exe) and the others produce dlls that are consumed by the executable. I've noticed that when I try to debug the executable, Visual Studio starts a build for the solution every time I debug. I'm at a loss as to why it builds the solution when nothing has changed in any project. I'm assuming that something in a project is causing the build to occur, but, I don't know what that may be.
Any ideas on how to troubleshoot this?
Update: This solution is built for.Net5. I found this setting in the options under SDK-Style projects that does not appear to work.
Go Tools->Options->Projects and Solutions->Build And Run, set MSBuild output to Detailed, build the project, check the output log.
You can also try resetting all settings.
The post, "Visual Studio not auto-building when I press the debug button" solved my problem. I set the following to force Visual Studio to NOT build each time I started the debugger.

After upgrading to Visual Studio 2019 16.7.1 the program hangs

I use Visual Studio Community 2019 with C++ (no .Net). Yesterday I updated to version 16.7.1. Ever since then, Visual Studio hangs on exit at the step "Unloading Projects". No projects are unloaded, and the progress bar never starts moving. The program simply hangs and is unresponsive. The only way out is to kill the process.
It also hangs whenever I try to change the Configuration target for the solution. Both issues occur on any of my solutions that I open. I have tried using Visual Studio Installer to repair the install, but it makes no difference. The installer does report one issue: Couldn't repair Microsoft.AspNetCore.TargetingPack.3.1.3.1.3 But this hardly seems like it matters to my Win32 projects.
This problem definitely started as soon as I updated to 16.7.1. I don't recall the previous version I had, but I had just updated a few days before so it was probably 16.7. I am posting to see if others have this problem and if anyone has found a solution (other than falling back a version). I will limp along with it for now.
Same happened to me. Just use visual studio 2017. Only thing that fixed it for me.

Visual Studio - how to reverse optimized code

I need some help. I have put in dozens of hours into a VB.NET project, it has been built in release mode and distributed. Now I have to make some changes to it, and I am unable to debug it properly. My code changes result in behavior where my code is not even recognized.
Also, I installed Visual Studio 2013 recently (moving from 2010), but this project behaves the same in both environments.
I believe that my code has become 'optimized'. The error window tells me that code is being skipped over, and that my code is optimized and JIT is checked.
I have turned off JIT, and I have tried everything to make this project work again that I could think of. I am desperately wanting to know how I can get this project to be in a state where it will debug each line of code again when I make changes.
I can even purposely write bad code, and the debugger does not see it.
This project is now in debug mode, not release. I have checked and followed threads on every thing that other people have done to solve this issue, but nothing works for me.
Either my project launches and works properly as it is coded, or if I change any code only the form launches with no code being run - at all.
please help.
I finally figured it out. The applications that I was struggling with were all built in Visual Studio 2010 on Windows 10. I was trying to work with these in Visual Studio 2013 on Windows 7.
Once I tried to work with them on Windows 10 (visual Studio 2013 this time), they started working and debugging just fine.
I think it may have been DLL assembly paths? Took me more than a week, but I figured out my issue by moving from Win7x64 to Win10x64.

How do I add versions to “Visual Studio Version Selector”, my list is empty

I have VS 2008, 2010, and 2012 installed.
Initially, VS2013 Team Explorer was installed (Shell only). I uninstalled that.
Now, the Visual Studio Version Selector shows an empty list when executing a .sln file. Nothing shows.
How can I repopulate this list? Where is it stored? Registry? I tried to find entries, but since it doesn't actually have any items in the list, I couldn't search for a specific string.
I just encountered the same issue after installing Visual Studio 2015 parallel to an existing 2013 installation. In my case it turned out that that the problem was related to the solution file itself: It seems that the version selector does not like BOMs etc. (don't know how the solution got crippled, though). Make sure that the solution starts with
Microsoft Visual Studio Solution File, Format Version 12.00
and has no space, non-printable character etc. before that. After saving the file, the effect should be immediately visible with the correct icon returning.
I just ran into a similar problem where this dialog started popping up after a recent Windows Update (Win10) on 1/6/2018. That update caused all sorts of havoc in terms of broken file associations.
I tried searching for solutions and trying a few things but everything was overly complicated and messy.
My solution was to run the Visual Studio (2013) repair.
After the repair, I did receive a warning (from vs installer) about update 3 failing to update but I restarted the computer and sln files can now open without needing that version dialog. Everything seems to be compiling and running fine as well.
Just ran into this situation for VS2017 then I realized I have unfinished updates for Visual Studio when checking Visual Studio Installer.
The installer displayed a hint that I should restart my computer to complete the update and after doing so, the version selector works again.

Visual Studio 2012 not debugging current solution

My Visual Studio 2012 Professional doesn't debug as it should.
It looks like VS is debugging old versions of my projects.
I tried debugging several projects but the same problem occurs with all of them, even when I start a new project (both console applications and windows forms applications).
It doesn't even hit the breakpoints I place right at the start of the program.
Things i've tried:
• cleaning and rebuilding my solution
• DEBUG -> options and settings -> Projects and Solutions -> Build and Run. Here I unchecked "Only build startup projects and dependencies on Run" and selected "Always build " from the "On Run, when projects are out of date" list
• deleting the .suo file (since the problem not project related I didn't expect it to be the solution but it was worth a shot).
As far as I know I didn't make any other changes to any property and I didn't perform any updates just before this issue started.
The following link descibes a similar issue but it doesn't contain a solution that works for me.
http://social.msdn.microsoft.com/Forums/vstudio/en-US/23e70e79-970d-423f-b434-12681b88ef2c/visual-studio-2012-debug-runs-old-code?forum=vsdebug
Superman also had a similar problem but again no suitable solution but in my case cleaning and rebuilding doesn't temporarily solve the problem.
Visual Studio 2012 Debugging Old Code
any ideas on how to solve this?
Have you tried a repair/reinstall of Visual Studio from the control panel ?
Also it could be related to a windows User profile issues. Assuming you are using Windows 7 you can try re-creating the profile using this post. http://www.techstaty.com/how-to-rebuild-a-windows-7-user-profile-the-correct-way/

Resources