fsprojects / ProjectScaffold

A prototypical .NET solution (file system layout and tooling), recommended for F# projects
http://fsprojects.github.io/ProjectScaffold
The Unlicense
515 stars 154 forks source link

CopyBinaries target does not support web application projects #152

Open dnauck opened 9 years ago

dnauck commented 9 years ago

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

Vidarls commented 9 years ago

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:

dnauck commented 9 years ago

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 commented 9 years ago

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

Vidarls commented 9 years ago

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