How to change(or use) Visual Studio 2019 to 2022

i wanna try that project GitHub - matkatmusic/AudioFilePlayer: A port of the juce AudioFilePlayerDemo into Plugin format
it is wirrten by visual studio 19 and I just try it .
unfortunately there are some build solution error, they couldn’t find v142 build.

so I went to Project->Properties->General->Platform Toolset
and changed Visual Studio v143 with _SharedCode,_StandalonePlugin,_VST3

and then I build solution and there are some good changes I think.

E0304 No instance of overloaded function “juce::TimeSliceThread::startThread” matches the argument list. AudioFilePlayer_SharedCode C:\JUCE\ref\AudioFilePlayer\Source\PluginProcessor.cpp 26

C2665 ‘juce::thread::startThread’: no overloaded function takes all the argument types. AudioFilePlayer_SharedCode C:\JUCE\ref\AudioFilePlayer\Source\PluginProcessor.cpp 26

LNK1104 Cannot open ‘AudioFilePlayer.lib’ file. AudioFilePlayer_VST3 C:\JUCE\ref\AudioFilePlayer\Builds\VisualStudio2019\LINK 1

MSB6006 “link.exe” exited with code 1104. AudioFilePlayer_StandalonePlugin C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets 1096

LNK1104 Cannot open ‘AudioFilePlayer.lib’ file. AudioFilePlayer_StandalonePlugin C:\JUCE\ref\AudioFilePlayer\Builds\VisualStudio2019\LINK 1

is it good try? and what should I do?

Instead of editing project properties in Visual Studio, I would start the Projucer (by Double-Clicking the .jucer file).
In the “Exporter” section of the Projucer, you can generate a Visual Studio 2022 build target.
You will then have proper VS2022 settings for your project right from the start.

This looks like you are maybe using a newer JUCE release than used in this two year old code example? It has probably been written targeting some JUCE 6 version. The way thread priorities are specified changed a while ago, so indeed something like startThread (3) does no longer work with a current JUCE 7 release. This has nothing to do with the visual studio version.

That change is described well in the breaking changes documentation here and should be relatively straightforward to fix in the code.