I have version 2019 and when generating get this error in the donet.exe window:
watch : Started
info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
User profile is available. Using 'C:\Users\GlennB-XPS8930\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
crit: Microsoft.AspNetCore.Server.Kestrel[0]
Unable to start Kestrel.
System.IO.IOException: Failed to bind to address http://127.0.0.1:5000: address already in use. ---> Microsoft.AspNetCore.Connections.AddressInUseException: Only one usage of each socket address (protocol/network address/port) is normally permitted ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
I have no idea what this means or how to resolve it.
In the template zip file, I modified program.cs and launchsettings.json, changing the references from 500x501x, adding the modified files back into the zipped file. I regenerated the app and these changes allowed everything to progress properly until the browser window opened. The url was localhost:5000. I modified the url to reference port 5010 and the url resolved properly displaying the data.
I am now running a search on the entire zipped file contents to see where another reference to port 5000 may exist. If anyone knows what file it may be, I would appreciate your letting me know.
That mean the port 5000 is already in use by another application. Check if you have another application running that use that port.Alternatively, just open the application by Visual Studio and run.