Relative output directory for Object File Name

If I change Object File Name from $(IntDir) to $(IntDir)%(RelativeDir), Visual Studio gives the following error when compiling: C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\