TheCherno / Hazel

Hazel Engine
Apache License 2.0
11.45k stars 1.49k forks source link

error MSB3073: The command "IF EXIST ..\bin\Debug-windows-x86_64\Hazel\Hazel.dll\ (xcopy /Q /E /Y /I ..\bin\Debug-windows-x86_64\Hazel\Hazel.dll ..\bin\Debug-windows-x86_64\Sandbox > nul) ELSE (xcopy /Q /Y /I ..\bin\Debug-windows-x86_64\Hazel\Hazel.dll ..\bin\Debug-windows-x86_64\Sandbox > nul) #681

Open Mephistoette opened 1 week ago

Mephistoette commented 1 week ago

when I set premake already, and then delete the hazel.sln,*vcxproj in Hazel and Sandbox Dirs, go back to run premake5.exe vs2022, everything seems ok, and I go back to open the Hazel.sln built by the premake in vs2022, then build Sanbox and Hazel, either of them show the same error " C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: The command "IF EXIST ..\bin\Debug-windows-x86_64\Hazel\Hazel.dll\ (xcopy /Q /E /Y /I ..\bin\Debug-windows-x86_64\Hazel\Hazel.dll ..\bin\Debug-windows-x86_64\Sandbox > nul) ELSE (xcopy /Q /Y /I ..\bin\Debug-windows-x86_64\Hazel\Hazel.dll ..\bin\Debug-windows-x86_64\Sandbox > nul)" another thing is that when I checking the Hazel and Sandbox properties, I found that the target directories and intermediate directories were blank, the path I set in premake didn't got read correctly.

Mephistoette commented 1 week ago

I figure out it, the solution is that replace "postbuildcommands { ("{COPY} %{cfg.buildtarget.abspath} ../bin/" .. outputdir .. "/Sandbox") } " with "postbuildcommands { ("{COPY} %{cfg.buildtarget.relpath} \"../bin/" .. outputdir .. "/Sandbox/\"") }"

ViktorPopp commented 1 week ago

Then please close the issue.