Need debug Visual Studio twice to show code changes

34 Views Asked by At

I'm creating an Avalonia project. This has the base shared project and three other projects, one for Android, Desktop, and iOS that reference the shared one.

The problem I'm running into is that after I make changes to the code, they do not take effect on the first run but if I close the app and debug again, the changes are there.

I have found ways to get it to work such as rebuilding the solution right after making changes manually and then debugging.

This is my build log:

Time Elapsed 00:00:01.37
------ Build started: Project: SippyDisco.Desktop, Configuration: Debug x64 ------
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Build completed at 7:30 AM and took 02.285 seconds ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
========== Deploy completed at 7:30 AM and took 02.285 seconds ==========

But after this log, the changes are not visible until I run again. It's almost as if the Desktop project is not waiting for the build to complete.

Things I have tried

  • Checking the build configuration to make sure build is checked
  • Setting maximum number of parallel project builds to 1
  • Unchecking Only build startup projects and dependencies on run
  • Ensuring Prompt to launch is selected On run when build or deployment errors occur
  • Deleting the obj, bin, and .vs files
  • Deleting the entire project and pulling the source again from GitHub
  • Resetting Visual studio to default settings
  • Deleting the project reference and adding it again
  • Unloading and reloading the projects
  • Checking the .csproj file to make sure it is not referencing a different directory for the project
0

There are 0 best solutions below