Copying Visual Studio project file(s) to output directory during build

后端 未结 8 2002
梦毁少年i
梦毁少年i 2020-12-03 00:29

When I build a Visual Studio project, the executable is written to the output directory specified in the projects Property Page.

I have a project that has some extra

8条回答
  •  被撕碎了的回忆
    2020-12-03 01:17

    In case this helps anyone, I needed to copy the output dll of the project i was building into another project.

    xcopy /y "$(ProjectDir)$(OutDir)$(TargetName)$(TargetExt)" 
    "C:\Application\MyApplicationName\bin\x86\Debug"
    
    /y = overwrite file if already exists
    $(ProjectDir) = location on your machine where the project lives
    $(OutDir) = is where your current build setup outputs the build
    $(TargetName) = What the project being built is set to be called. Ex: XXX of XXX.dll
    $(TargetExt) = the extension of the build Ex: .dll of XXX.dll
    
    "C:/..../x86/Debug" is the location to copy to.
    

提交回复
热议问题