serverless-dotnet icon indicating copy to clipboard operation
serverless-dotnet copied to clipboard

Allow building of solutions

Open Perlkonig opened this issue 7 years ago • 6 comments

My lambdas are in a solution to facilitate unit testing. This PR lets you specify a custom:dotnet:slndir setting in your service config and build from within that project.

My editor made a bunch of indentation changes that I went back and undid, but then I couldn't make things squash, so hopefully you can just merge the PR as a single commit. Let me know if there's something else you'd like me to do.

Thanks!

Perlkonig avatar Jun 07 '18 19:06 Perlkonig

It's backwards compatible, by the way. If you don't provide the settings, it works exactly as it currently does.

Perlkonig avatar Jun 18 '18 13:06 Perlkonig

@fruffin Any reason this hasn't been merged in?

exocom avatar Aug 21 '18 21:08 exocom

I apologize again for all the individual commits. Apparently there's a "Squash and merge" option for accepting PRs that will clean this up. But I'm going to practice my rebasing skills so I don't do this in a future PR ever again.

Perlkonig avatar Aug 23 '18 03:08 Perlkonig

@Perlkonig first of all, sorry for the delay on this one. I'm not sure I understand why you would want to build a full solution though. Could you please clarify?

The way I have been working with .Net projects so far was to have them in a solution as well, but I have never needed to build more than the "service" project, given that all its dependencies should be built at the same time too. Unit testing is a separate problem to solve, and calling dotnet test triggers a build anyway, if I remember correctly.

Thanks for your help!

fruffin avatar Sep 27 '18 04:09 fruffin

Looks like I lied in my documentation update 😊 It's not building the whole solution, nor do you actually point to the solution root folder. You point to the actual project folder. I apologize for that error. This change is for anyone who wants to store their project in any subfolder, not just solutions, though that would be the most common, I would think.

But perhaps I'm doing something wrong? Is it already possible to point to a subfolder?

Perlkonig avatar Sep 27 '18 10:09 Perlkonig

Perhaps I should change the setting name to projdir instead of slndir to avoid further confusion.

Perlkonig avatar Sep 27 '18 20:09 Perlkonig