Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

func.exe terminates after error when debugging as a web project #132

Closed
rburnham52 opened this issue May 8, 2017 · 3 comments
Closed

func.exe terminates after error when debugging as a web project #132

rburnham52 opened this issue May 8, 2017 · 3 comments

Comments

@rburnham52
Copy link

Hi,
I'm trying to setup a project as a web project based on these instructions

https://blogs.msdn.microsoft.com/appserviceteam/2017/03/16/publishing-a-net-class-library-as-a-function-app/
and
https://github.com/lindydonna/FunctionsAsWebProject

I created a new ASP.net web application using the blank template, went through all nuget packages and installed missing ones. Then copied the sample function into the new project, setup the project settings to start func.exe as the instructions say. From what i can see my new project is the same as the sample one. However when i try running it either with debugging or without the host starts but it shows a red error for a split second and then terminates, its not long enough to see what is wrong.

I've work around the issue, this is just a FYI task, if this is likely to be the dev environment moving forward it would be good if you can setup the host to not exit on errors or someout output the console somewhere.

For now i was able to run the sample fine so i just renamed it, changes the namespaces and updated function.json. This seems to work. The only difference i can see is that the sample opens in VS2017 when i was using VS2015

@rburnham52
Copy link
Author

Think i just figured out what was wrong with my attempt, there was a appsettings.json and host.json in the project dir that wasn't included in the project so i didn't see them.

@lindydonna
Copy link
Contributor

Yes, that was the issue. In the future, you can add the flag --pause-on-error to func.exe to see the error message in the command window.

@cc-talha
Copy link

I guess flag --pause-on-error isnt working at my side..
adding flag like
func run functionname --pause-on-error
still terminal close and no error message on cmd or powershell
any guess ?

@ghost ghost locked as resolved and limited conversation to collaborators Dec 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants