skip to Main Content

I have a ASP .NET CORE application, targeted in verion 6.0.
When I run it from Visual Studio it looks great, but when I run it using dotnet command:

dotnet webApplication1.dll

it looks like no .css styles or .js scripts where found and used.
I searched this documentation but cannot find the hint how to include styles path.

2

Answers


  1. Chosen as BEST ANSWER

    I solved it by manually copying wwwroot folder to the binDebugnet6.0 directory. For some reasons it is not being copied there automatically.


  2. I think you are using the wrong command
    You should use.

    dotnet run
    

    If you want to use the dotnet command you should publish you app before in order to have all the misc files.

    You need to do :

    dotnet publish
    

    Before running the app using

    dotnet Webapp.dll
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search