Reputation: 86
Consider the following:
netcoreapp2.1
that is set up to load some NuGet packages and place them in a folder within the project. Upon completion, application stopsnet6.0
, the NuGet pckages are only loaded after making an HTTP request to any endpoint in the appMore specifically, I hit F5 to launch the application in Debug mode:
netcoreapp2.1
does what it is supposed to, and then debug stopsnet6.0
does not start application until HTTP request is sent from browserTrying to find what could be causing this, I came across this post that lists an expected flow of actions when we hit F5:
It seems like my net6.0
does not hit step 1 until I make a call to an endpoint, but I am not sure how to move forward, or what to look for.
I'm very new to development in general, and often can't find the proper terms to use when searching for a problem, so any advice you can give search-wise is appreciated!
Upvotes: 0
Views: 91
Reputation: 86
After seeing this answer in another post, I realized I was debugging using the wrong profile. After selecting the project one (or using process {project name}.exe
), the application behaved as expected.
Before:
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
After:
"profiles": {
"Project Name": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"hotReloadEnabled": false
}
}
Upvotes: 1