6

My ultimate goal is to create a distribution folder when I build my solution that will contain all of the binaries and other required files whenever I build my solution. I thought the best way to do this would be to add a before.solutionName.sln.targets file that will create these directories. When I build the project using msbuild.exe and the command line the directory is created (from the before.targets file). However, when I build from within visual studio the directory is not created. And I have tried to close the solution and reopen it to make sure the solution has been reloaded.

Also, I know I can do this from a project file but since the solution contains multiple projects it doesnt make sense to have each solution create the required directories. If I can get Visual Studio to use these .targets files instead I can reuse them in other projects with the same form.

german129
  • 237
  • 2
  • 10
  • 1
    possible duplicate of [How can I invoke my MSBuild Target when msbuild.exe starts and when it ends](http://stackoverflow.com/questions/17709873/how-can-i-invoke-my-msbuild-target-when-msbuild-exe-starts-and-when-it-ends) – jessehouwing May 12 '15 at 19:36
  • See: http://connect.microsoft.com/VisualStudio/feedback/details/782934/visual-studio-not-executing-before-or-after-solution-file-targets – jessehouwing May 12 '15 at 19:36
  • I guess the short answer is....not possible. Should I update my question then to ask the best way to create a distributable directory for a solution in Visual Studio? – german129 May 12 '15 at 19:42

0 Answers0