1

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 2

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
Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.