Error when using Visual Studio 2022

Hi,
I followed the tutorial steps and created a very first Basic Plugin using Projucer. I selected Visual Studio 2022. Did no code change at all and tried to compile the generated files. Got these errors:

Build started...
1>------ Build started: Project: PluginTest3_SharedCode, Configuration: Debug x64 ------
1>PluginProcessor.cpp
1>PluginEditor.cpp
1>include_juce_audio_basics.cpp
1>include_juce_audio_devices.cpp
1>include_juce_audio_formats.cpp
1>include_juce_audio_plugin_client_ARA.cpp
1>include_juce_audio_plugin_client_utils.cpp
1>include_juce_audio_processors_ara.cpp
1>include_juce_audio_processors_lv2_libs.cpp
1>include_juce_audio_utils.cpp
1>include_juce_core.cpp
1>D:\Dropbox (Mechamania)\Exoleap\sub_projects\SpectralSoundStudio\software\Plugin\PluginTest3\Source\PluginProcessor.cpp(80,56): warning C4100: 'index': unreferenced formal parameter
1>D:\Dropbox (Mechamania)\Exoleap\sub_projects\SpectralSoundStudio\software\Plugin\PluginTest3\Source\PluginProcessor.cpp(84,67): warning C4100: 'index': unreferenced formal parameter
1>D:\Dropbox (Mechamania)\Exoleap\sub_projects\SpectralSoundStudio\software\Plugin\PluginTest3\Source\PluginProcessor.cpp(89,83): warning C4100: 'newName': unreferenced formal parameter
1>D:\Dropbox (Mechamania)\Exoleap\sub_projects\SpectralSoundStudio\software\Plugin\PluginTest3\Source\PluginProcessor.cpp(89,56): warning C4100: 'index': unreferenced formal parameter
1>D:\Dropbox (Mechamania)\Exoleap\sub_projects\SpectralSoundStudio\software\Plugin\PluginTest3\Source\PluginProcessor.cpp(94,71): warning C4100: 'samplesPerBlock': unreferenced formal parameter
1>D:\Dropbox (Mechamania)\Exoleap\sub_projects\SpectralSoundStudio\software\Plugin\PluginTest3\Source\PluginProcessor.cpp(94,55): warning C4100: 'sampleRate': unreferenced formal parameter
1>D:\Dropbox (Mechamania)\Exoleap\sub_projects\SpectralSoundStudio\software\Plugin\PluginTest3\Source\PluginProcessor.cpp(132,99): warning C4100: 'midiMessages': unreferenced formal parameter
1>D:\Dropbox (Mechamania)\Exoleap\sub_projects\SpectralSoundStudio\software\Plugin\PluginTest3\Source\PluginProcessor.cpp(155,15): warning C4189: 'channelData': local variable is initialized but not referenced
1>D:\Dropbox (Mechamania)\Exoleap\sub_projects\SpectralSoundStudio\software\Plugin\PluginTest3\Source\PluginProcessor.cpp(173,73): warning C4100: 'destData': unreferenced formal parameter
1>D:\Dropbox (Mechamania)\Exoleap\sub_projects\SpectralSoundStudio\software\Plugin\PluginTest3\Source\PluginProcessor.cpp(180,76): warning C4100: 'sizeInBytes': unreferenced formal parameter
1>D:\Dropbox (Mechamania)\Exoleap\sub_projects\SpectralSoundStudio\software\Plugin\PluginTest3\Source\PluginProcessor.cpp(180,66): warning C4100: 'data': unreferenced formal parameter
1>include_juce_data_structures.cpp
1>include_juce_events.cpp
1>include_juce_graphics.cpp
1>include_juce_gui_extra.cpp
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003: The specified task executable "CL.exe" could not be run. System.IO.IOException: The process cannot access the file 'x64\Debug\Shared Code\PluginTe.56B7FD42.tlog\CL.10876.read.1.tlog' because it is being used by another process.
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at System.IO.FileInfo.Delete()
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.DeleteEmptyFile(ITaskItem[] filesToDelete)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.CPPTasks.CL.PostExecuteTool(Int32 exitCode)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(703,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.Execute()
1>Done building project "PluginTest3_SharedCode.vcxproj" -- FAILED.
2>------ Build started: Project: PluginTest3_StandalonePlugin, Configuration: Debug x64 ------
2>include_juce_audio_plugin_client_Standalone.cpp
2>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1096,5): error MSB6006: "link.exe" exited with code 1104.
2>LINK : fatal error LNK1104: cannot open file 'PluginTest3.lib'
2>Done building project "PluginTest3_StandalonePlugin.vcxproj" -- FAILED.
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 1:13 PM and took 15.345 seconds ==========

When building it for Visual Studio 2019 and compile with Visual Studio 2019, it works.

Well, it may happen for several reasons. I will suggest that you ensure there are no background processes or antivirus software that could slow down the form interaction.
Thanks

My guess is that Dropbox is trying to interact with temporary files created by the compiler.

It’s probably not a good idea to have your build folder in Dropbox - I’d recommend excluding that folder (if possible, I don’t know whether Dropbox supports exclusions), or moving the entire project out of Dropbox and using a proper source-code management system like Git instead.

You are right!
When I pause Dropbox it compiles correctly.
The strange thing is that VS 2019 doesn’t seem to have this problem.

Thx.