INSTALL Build MSB3073 The Command "Setlocal Error

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

_Geant4 Version:_11.2.1
_Operating System:_Windows 11
_Compiler/Version:_2022
_CMake Version:_3.29.3


I am trying to install Geant4 11.2.1 on Windows 11. I have executed build for ALL_BUILD successfully on VS 2022. But for build INSTALL, it is showing "MSB3073 the command “setlocal” error. Tried everything on the internet but can not seem to solve the problem.

Any kind of help is appreciated.
Thanks in advance.

Having a search around myself, it looks like this may be related to permissions of destination paths or odd characters in the install path. Do you you get any other information about the error (e.g. as shown in this StackOverflow post)?

I’ve tried almost everything on the internet. Nothing is working. There is no other information about the error as such. It’s just "MSB3073, The command “setlocal.”

There must be something else being printed surely? All the reports I can find show some indication of what was run and additional info on the error - do you have any indication of these anywhere on the terminal, or in Visual Studio? If not, there’s nothing we can do to help I’m afraid.

I give up. Going for Linux instead.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.