I have an exe
being dropped into my bin
directory however sometimes this exe
will be dropped into debug
or release
. Is there any way to - from a post-build event - say "hey, wherever we built this thing, copy it into the wwwroot folder"?
I see the following: http://www.benramey.com/2010/06/29/visual-studio-post-build-event-to-copy-dlls/
Where this code is used:
cd $(ProjectDir)
copy /y bin\debug\*.dll C:\inetpub\wwwroot\wss\VirtualDirectories\{YOUR SHAREPOINT SITE DIRECTORY}\bin
However I want to not specify debug or release or netcoreapp2.0
or netcoreapp
:
How can this be achieved?
Use the provided macros. You already used $(ProjectDir)
.
$(TargetPath)
will contain the complete path to the executable. $(OutDir)
will contain the output directory (relative).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.