Copy folder to build directory Visual Studio C++












0















How do I go about to make Visual Studio add a folder from my project into the build directory (for example x64Release)? I have a folder for images that I want to be included when I build my application so that they can easily be accessed in relation to the executable's location. The problem with doing it manually is that I have to copy it over manually for both my debug and release folders instead of keeping it all compact withing my project. It also helps with uploading to github.



So is there any way to do this? And if so, how?










share|improve this question























  • This appears to be an installer issue. You may want to install an installer plug-in (add-in) and check the destination folder structure.

    – Thomas Matthews
    Nov 13 '18 at 19:14






  • 1





    Would be easier to answer if you show the project structure, but one simple way is defining a post-build event in the project properties like xcopy /Y $(ProjectDir)/images/*.bmp $(OutDir) should do the trick

    – stijn
    Nov 13 '18 at 19:16













  • This is a build tools issue. Not a C++ issue.

    – Jesper Juhl
    Nov 13 '18 at 20:07











  • @JesperJuhl The problem is specific to C++ however. I already found solutions for C# where Visual Studio behaves differently.

    – Lorago
    Nov 13 '18 at 20:23











  • Technically it's related to the build system for C++ as used by MSBuild and/or Visual Studio, that's way more specific than 'C++' the language

    – stijn
    Nov 13 '18 at 20:48
















0















How do I go about to make Visual Studio add a folder from my project into the build directory (for example x64Release)? I have a folder for images that I want to be included when I build my application so that they can easily be accessed in relation to the executable's location. The problem with doing it manually is that I have to copy it over manually for both my debug and release folders instead of keeping it all compact withing my project. It also helps with uploading to github.



So is there any way to do this? And if so, how?










share|improve this question























  • This appears to be an installer issue. You may want to install an installer plug-in (add-in) and check the destination folder structure.

    – Thomas Matthews
    Nov 13 '18 at 19:14






  • 1





    Would be easier to answer if you show the project structure, but one simple way is defining a post-build event in the project properties like xcopy /Y $(ProjectDir)/images/*.bmp $(OutDir) should do the trick

    – stijn
    Nov 13 '18 at 19:16













  • This is a build tools issue. Not a C++ issue.

    – Jesper Juhl
    Nov 13 '18 at 20:07











  • @JesperJuhl The problem is specific to C++ however. I already found solutions for C# where Visual Studio behaves differently.

    – Lorago
    Nov 13 '18 at 20:23











  • Technically it's related to the build system for C++ as used by MSBuild and/or Visual Studio, that's way more specific than 'C++' the language

    – stijn
    Nov 13 '18 at 20:48














0












0








0








How do I go about to make Visual Studio add a folder from my project into the build directory (for example x64Release)? I have a folder for images that I want to be included when I build my application so that they can easily be accessed in relation to the executable's location. The problem with doing it manually is that I have to copy it over manually for both my debug and release folders instead of keeping it all compact withing my project. It also helps with uploading to github.



So is there any way to do this? And if so, how?










share|improve this question














How do I go about to make Visual Studio add a folder from my project into the build directory (for example x64Release)? I have a folder for images that I want to be included when I build my application so that they can easily be accessed in relation to the executable's location. The problem with doing it manually is that I have to copy it over manually for both my debug and release folders instead of keeping it all compact withing my project. It also helps with uploading to github.



So is there any way to do this? And if so, how?







c++ visual-studio build visual-studio-2017






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 19:09









LoragoLorago

195




195













  • This appears to be an installer issue. You may want to install an installer plug-in (add-in) and check the destination folder structure.

    – Thomas Matthews
    Nov 13 '18 at 19:14






  • 1





    Would be easier to answer if you show the project structure, but one simple way is defining a post-build event in the project properties like xcopy /Y $(ProjectDir)/images/*.bmp $(OutDir) should do the trick

    – stijn
    Nov 13 '18 at 19:16













  • This is a build tools issue. Not a C++ issue.

    – Jesper Juhl
    Nov 13 '18 at 20:07











  • @JesperJuhl The problem is specific to C++ however. I already found solutions for C# where Visual Studio behaves differently.

    – Lorago
    Nov 13 '18 at 20:23











  • Technically it's related to the build system for C++ as used by MSBuild and/or Visual Studio, that's way more specific than 'C++' the language

    – stijn
    Nov 13 '18 at 20:48



















  • This appears to be an installer issue. You may want to install an installer plug-in (add-in) and check the destination folder structure.

    – Thomas Matthews
    Nov 13 '18 at 19:14






  • 1





    Would be easier to answer if you show the project structure, but one simple way is defining a post-build event in the project properties like xcopy /Y $(ProjectDir)/images/*.bmp $(OutDir) should do the trick

    – stijn
    Nov 13 '18 at 19:16













  • This is a build tools issue. Not a C++ issue.

    – Jesper Juhl
    Nov 13 '18 at 20:07











  • @JesperJuhl The problem is specific to C++ however. I already found solutions for C# where Visual Studio behaves differently.

    – Lorago
    Nov 13 '18 at 20:23











  • Technically it's related to the build system for C++ as used by MSBuild and/or Visual Studio, that's way more specific than 'C++' the language

    – stijn
    Nov 13 '18 at 20:48

















This appears to be an installer issue. You may want to install an installer plug-in (add-in) and check the destination folder structure.

– Thomas Matthews
Nov 13 '18 at 19:14





This appears to be an installer issue. You may want to install an installer plug-in (add-in) and check the destination folder structure.

– Thomas Matthews
Nov 13 '18 at 19:14




1




1





Would be easier to answer if you show the project structure, but one simple way is defining a post-build event in the project properties like xcopy /Y $(ProjectDir)/images/*.bmp $(OutDir) should do the trick

– stijn
Nov 13 '18 at 19:16







Would be easier to answer if you show the project structure, but one simple way is defining a post-build event in the project properties like xcopy /Y $(ProjectDir)/images/*.bmp $(OutDir) should do the trick

– stijn
Nov 13 '18 at 19:16















This is a build tools issue. Not a C++ issue.

– Jesper Juhl
Nov 13 '18 at 20:07





This is a build tools issue. Not a C++ issue.

– Jesper Juhl
Nov 13 '18 at 20:07













@JesperJuhl The problem is specific to C++ however. I already found solutions for C# where Visual Studio behaves differently.

– Lorago
Nov 13 '18 at 20:23





@JesperJuhl The problem is specific to C++ however. I already found solutions for C# where Visual Studio behaves differently.

– Lorago
Nov 13 '18 at 20:23













Technically it's related to the build system for C++ as used by MSBuild and/or Visual Studio, that's way more specific than 'C++' the language

– stijn
Nov 13 '18 at 20:48





Technically it's related to the build system for C++ as used by MSBuild and/or Visual Studio, that's way more specific than 'C++' the language

– stijn
Nov 13 '18 at 20:48












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53287956%2fcopy-folder-to-build-directory-visual-studio-c%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53287956%2fcopy-folder-to-build-directory-visual-studio-c%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Florida Star v. B. J. F.

Danny Elfman

Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues