Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't find a project to run. Ensure a project exists in D:\home\site\wwwroot

I've been wrestling with this issue forever now. I'm trying to get my ASP.NET Core 2.1 app to run on Azure App Service.

Here's the strange behavior I'm seeing in Kudu.

I see the dll file for my project in Kudu console in D:\home\site\wwwroot. I then type dotnet run myproject.dll and I get the following error:

Couldn't find a project to run. Ensure a project exists in D:\home\site\wwwroot

Any idea what's going on here?

like image 327
Sam Avatar asked Apr 26 '18 17:04

Sam


2 Answers

From the docs

The dotnet run command is used in the context of projects, not built assemblies. If you're trying to run a framework-dependent application DLL instead, you must use dotnet without a command.

So try and run it like this

dotnet myproject.dll
like image 69
Marcus Höglund Avatar answered Oct 17 '22 12:10

Marcus Höglund


I was having the same issue. Not sure if this is a work-around but it ran the code.

dotnet run --project name-of-your-project-here
like image 20
david myers Avatar answered Oct 17 '22 11:10

david myers