Skip to content

[Bug]: MSB3101 build error when trying to build project after adding new source file due to permissions error #1575

@brno32

Description

@brno32

Detailed steps on how to reproduce the bug

  • start a new project (I used this template https://github.com/TheAudioProgrammer/JuceAudioPluginTemplate)
  • run cmake -B build -G "Visual Studio 17 2022", open the .sln file (as a regular user, NOT as an admin), hit build. so far so good
  • add a new C++ class. I added Square.h and Square.cpp. the content doesn't matter
  • call out these files in CMakeLists.txt
  • run CMake again, then try to build, and observe the error MSB3101
  • reopen Visual Studio as an administrator
  • build again and it works

What is the expected behaviour?

that command should return exit code 0 and the project should build

Operating systems

Windows

What versions of the operating systems?

Windows 11

Architectures

x86_64

Stacktrace

Severity	Code	Description	Project	File	Line	Suppression State	Details
Error	MSB3073	The command "setlocal
"C:\Program Files\CMake\bin\cmake.exe" -E echo "removing moduleinfo.json"
if %errorlevel% neq 0 goto :cmEnd
"C:\Program Files\CMake\bin\cmake.exe" -E remove -f C:/Repos/JuceAudioPluginTemplate/build/SimpleJucePluginTemplate_artefacts/Debug/VST3/TapPluginTemplate.vst3/Contents/moduleinfo.json C:/Repos/JuceAudioPluginTemplate/build/SimpleJucePluginTemplate_artefacts/Debug/VST3/TapPluginTemplate.vst3/Contents/Resources/moduleinfo.json
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
setlocal
"C:\Program Files\CMake\bin\cmake.exe" -E echo "creating C:/Repos/JuceAudioPluginTemplate/build/SimpleJucePluginTemplate_artefacts/Debug/VST3/TapPluginTemplate.vst3"
if %errorlevel% neq 0 goto :cmEnd
"C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Repos/JuceAudioPluginTemplate/build/SimpleJucePluginTemplate_artefacts/Debug/VST3/TapPluginTemplate.vst3/Contents/Resources
if %errorlevel% neq 0 goto :cmEnd
Debug\SimpleJucePluginTemplate_vst3_helper.exe > C:/Repos/JuceAudioPluginTemplate/build/SimpleJucePluginTemplate_artefacts/Debug/VST3/TapPluginTemplate.vst3/Contents/Resources/moduleinfo.json
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
setlocal
"C:\Program Files\CMake\bin\cmake.exe" -Dsrc=C:/Repos/JuceAudioPluginTemplate/build/SimpleJucePluginTemplate_artefacts/Debug/VST3/TapPluginTemplate.vst3 "-Ddest=C:\Program Files\Common Files/VST3" -P C:/Repos/JuceAudioPluginTemplate/build/_deps/juce-src/extras/Build/CMake/copyDir.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1.	SimpleJucePluginTemplate_VST3	C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets	166

Plug-in formats (if applicable)

VST3

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

I have not tested against the develop branch

Code of Conduct

  • I agree to follow the Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions