After upgrading my project to ASP.NET Core 2.2, I tried to run the application (locally of course) and the browser displayed an error message like in the below screenshot.
no more errors notified by visual studio error explorer. I don't know what's happen.
I was also getting the same issue. And when I looked at the Output window of my solution.
Then I was able to see a different error, which is "The target process exited without raising CoreCLR started event", to fix this I had to remove the Microsoft.AspNetCore.All from my Nuget Packages and install Microsoft.AspNetCore.App. I also had to install the correct .Net SDK from here. Once this is done, restarted my machine and open the solution, the error was gone. Hope it helps
you have 2 solution(this answer works on windows server I do not know anything about linux server).
first:
copy all folder(except bin and obj folder) of your project to server
open cmd in your project folder then run this command:
dotnet run
then all warning and error show to you(if you have error about above command not recognize download dot net core sdk from this link)second:
in my case web.config is:
and I change it to:
Be carefull publishing.
When i publish it to my PreProd envitoment this conf works well: Portable
But on my Prod enviroment that conf does not work. I had to choose the especificated one: win-x64
I dont know the reason about that. If someone know i'll gratefull to know!