Base solution for your next web application
Open Closed

Swagger UI not formatted. #12525


User avatar
0
TimMackey created

I downloaded the latest 14.2.1 version for ASP.NET Core & Angluar. I ran 'Update-Database' in the Package Manager Console. db updated. Set *.Web.Host as default project and ran it. I was expecting this: but I got this: Chrome Developer Console reports: Login:1 [DOM] Input elements should have autocomplete attributes (suggested: "current-password"): (More info: https://goo.gl/9p2vKq) <input type=​"password" id=​"password" name=​"Password" placeholder=​"Password">​ Login:1 Refused to apply style from 'https://localhost:44301/view-resources/Views/Ui/Login.min.css' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled. Login:1 Refused to apply style from 'https://localhost:44301/view-resources/Views/Ui/Login.min.css' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled. Navigated to https://localhost:44301/Ui/Login Login:35 Refused to apply style from 'https://localhost:44301/view-resources/Views/Ui/Login.min.css' because its MIME type ('') is not a supported stylesheet MIME type, and strict MIME checking is enabled. Login:1 [DOM] Input elements should have autocomplete attributes (suggested: "current-password"): (More info: https://goo.gl/9p2vKq) <input type=​"password" id=​"password" name=​"Password" placeholder=​"Password">​

SOLUTION: ran "csso -o Login.min.css Login.css" in folder *.Web.Host\wwwroot\view-resources\Views\Ui. Please update the "Getting Started" instructions here: https://docs.aspnetzero.com/aspnet-core-angular/latest/Getting-Started-Angular We're way past VS 2017 now, and the instructions don't reflect current operations. Thank you.

MEA CULPA: I found "In the Web.Host project, run npm run create-bundles to bundle and minify" here: https://docs.aspnetzero.com/aspnet-core-angular/latest/Deployment-Angular

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

2 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @TimMackey

    In version 14.2.1, the Host project also requires bundle files. After opening the *Web.Host project in the terminal, you need to run the bundle and minify commands. To do this, run the npm run create-bundles or yarn create-bundles commands.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    TimMackey created

    got it.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)