ProjectScaffold icon indicating copy to clipboard operation
ProjectScaffold copied to clipboard

CopyBinaries target does not support web application projects

Open dnauck opened this issue 10 years ago • 4 comments

The CopyBinaries target was introduced in pull request #116 and copies all data from each project's bin/Release/ folder into the bin folder.

A web application project does only have a bin/ folder, whatever configuration (Debug; Release) is used. So as soon as you add a web application project to your solution this task fails because it cannot find the bin/Release folder. It should use the bin/folder instead.

//cc @Vidarls

dnauck avatar Mar 24 '15 09:03 dnauck

Is this is just a different convention for the default output path of the project, or is it something more hardwired, IE not possible to change in project->properties->build->output path?

Pre CopyBinaries, each new project had to manually set the output path to [project root]/bin The goal of copy binaries is to allow easy adding of new projects without having to worry about output path settings.

In order to fix this we have to either:

  • Remove any inference and require manually setting output path of projects
  • Somehow infer / read / parse /do-magic to figure out the configured output path of projects and copy from there (I believe Paket does some magic like that during packing of project templates..)

Vidarls avatar Mar 24 '15 10:03 Vidarls

Hi,

your new solution is top. But a WebApplication has this as default and also need this setting; otherwise it's not abel to load its binaries on startup.

Maybe you can check on your loop method if bin/Releaseexists; otherwise try bin/and if both do not exist -> ignore this project.

dnauck avatar Mar 24 '15 10:03 dnauck

Well, but using the project's output path from Release configuration would be better ;)

@forki told me that you could port the Paket detection code over to FAKE maybe.

Edit: https://github.com/fsprojects/Paket/blob/master/src/Paket.Core/ProjectFile.fs#L496

dnauck avatar Mar 24 '15 10:03 dnauck

Would be cool to have the output detection in the ProjectFile helper or something?

But: I have expended my Yak shaving quota for some time now, which mean I have no idea when I might get the chance to have a go at this

Vidarls avatar Mar 24 '15 11:03 Vidarls