Visual Studio 2022 c++ hot reload

Enjoying CLion with macOS at the moment, but this vs 2022 feature sounds amazing for DSP and UI development:

CMake support is also planned. Someone already tried this with juce?

Just tried it without success.

Matt

I hoped so much that it works. Maybe we will find a way to make it work in the future. I thought about building a standalone plugin and use this as a basis for hot reload. Hope i have time to try this in the next time.

I believe Projucer did this long time before Visual Studio and many similar others (Runtime Compiled C/C++, Ctoy, hotreload, blazor, etc…)

Its already there inside Projucer. Enjoy it!

God blesses!!!

Best regards,
Sanyaade

I don’t use Projucer anymore and switched to CMake a while ago. I tried it in the past with Projucer, but i had not much success with that feature.

I guess you missed that the Projucer live build engine is no longer supported, @sanyaade2?

Okay! I was planning to use this in my programming classes.

Could it be just turn a off/on features or will it be removed entirely?

I will do more research this weekend on other possibilities. I need this for HND/FDSc lessons.

God blesses!!!

Best regards,
Sanyaade

In the topic linked above they say that it’s removed with JUCE 6.1. I haven’t used the Projucer for over a year now since we ported all our projects to use CMake, so I can’t even say if it’s really no longer part of the current Projucer since it’s not installed on my machine anymore.

However, incremential rebuild times are fairly fast on modern computers for simple showcase projects anyway, so is the live build engine really that crucial for your use-case?

Slightly off-topic: Especially if you are giving classes, why not teaching modern approaches from the beginning on and show your students how modern industry standard projects are developed with CMake instead of sticking to the old Projucer approach? With tools like VScode you have the advantage of being able to use the same free tools for every operating system, so this is what I’d probably pick today if I was giving classes. But you might have good reasons to do it differently, so just a thought :slight_smile:

1 Like

I could have gone that way but:

  1. Age group are 16-18 year old for my BTEC (my older group are also beginners)
  2. Interactive programming with algorithms (good for beginners in C/C++)
  3. Visual Studio 2022 Community Edition is: >= 16GB storage space, non-portable, registry-based IDE compared with Code::Blocks < 700MB, portable, runs on USB flash memory, etc… This is the reason why MinGW was born in the first place (Everything include JUCE on a USB stick, even on Pi 4 with an SSD)

With Visual Studio, I spent more time supporting my students, getting to run for my students than teaching the classes, etc…
CMake: I used it in my other projects. CMake is a project/packager manager along line of Make, Scons, Cargo, Alire (Ada), etc… that I am using in my other projects

I will spend the weekend on this!

God blesses!!!

Best regards,
Sanyaade

It works if I set the projucer setting as,

Hot reloading does not make much of a difference on my machine though.

2 Likes

Please can you share more about what you did to get this working? So keen to get this working, but no progress yet!

Hi Jamie,

In the projucer, under the “Visual Studio 2022”, for the “Debug” configuration, set the “Debug Information Format” to "Program Database for Edit And Continue (/ZI) "and “Incremental Linking” to “Enabled” like it is in the above picture.

In Visual Studio, make sure you have selected the “Debug” configuration and run the program. Now, make any changes in any functions and press hot reload. It should recompile only what you have edited and link it on the fly.

Here the project that was used,
NewProject.zip (65.7 KB)

2 Likes

Thank you so much for taking the time to make this demo project!
I now realise the problem I had was not using the VS2022 exporter instead of using the VS2019 exporter which was then opening VS2022 since it was the default program for .sln files.

Working all well and good on my end! Thank you so much :slight_smile: :heart:

As of recently, if you set the “Visual Studio Version Selector” program as the default program for .sln files, JUCE projects will automatically open with the version of VS that matches the exporter.

I’m pretty sure something is up with my setup, since even with I ‘Open With’ ‘Visual Studio Version Selector’ it immediately opens VS2019 without any prompting.

I had that too until I used Open With and clicked “always use this app to open…”