0
votes

We've been using Blazor for a few months with Radzen and recently Spinkit. I merged some changes from master into my features branch and the system now can't resolve css from the packages. The changes merged were completely isolated from Blazor specific code, just injected service classes not related to web, as well as moving Autofac registrations to the Program.cs. I just can't put my finger on what could have gone wrong. If I hard reset back to the branch prior all is good. I've been over it a few times but just can't work it out. This is the Chrome console output: enter image description here

We have this CSS in the head of _Host.cshtml:

<link href="_content/Radzen.Blazor/css/default-base.css" rel="stylesheet" />
<link href="_content/BlazorPro.Spinkit/spinkit.min.css" rel="stylesheet" />

and these scripts at the end of body

<script src="_framework/blazor.server.js"></script>
<script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>

We're using Radzen.Blazor 2.11.14 and BlazorPro.Spinkit 1.2.0 on netcoreapp3.1.

Anyone know what might be causing this?

1
Try to invert scripts declaration order - agua from mars
Unfortunately it made no difference - Stephen York
try to clean remove all obj, bin and .vs folder and rebuild - agua from mars
Thanks for the advice. These are steps I always try. I found the answer to my specific issue and posted here. - Stephen York

1 Answers

0
votes

Turns out an incoming change from master had this in launchsettings.json

 "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Local"
      }
    },

I switched local back to development which fixed the issue. We wanted to put AzureDevOps Personal Access Tokens in a git ignored file called appsettings.local.json. I guess that obvious option is out the window.

Anyone know why this breaks the pipeline? The ridiculous part is the entire site works normally without other errors. It just stops nuget packages from loading (at runtime) and gives no message about it. I'm not sure if this is a Blazor, Razor or ASP.NET Core MVC issue.

This coupled with a few other issues I've hit have convinced me that Blazor is incomplete to the point of being unusable for an enterprise project. Is early days for us so a switch to a real SPA platform is being worked into our backlog.