Just updated to Telerik.UI.for.Blazor 2.2.1, but was having the problem before updating as well. I suspect its just something Im missing.
When I load my page, im getting 404 errors in the dev console for telerik-blazor.js. I am adding dependencies to an existing Blazor project I started.
We have the private nuget feed setup. So that much looks right. What am I missing?
This is in _Host.cshtml
This is my MainLayout.cshtml
6 Answers, 1 is accepted
Oh, forgot to mention that I made sure to follow along all the "setup" bits in this area, esp for static assets
Somethings still not right
In the notes, I see this
Static assets are automatically included in the solution by the Nuget package, so all that's needed is then to reference the asset:
Which makes me wonder what this _content folder is
Well, silly me I think I skipped right past the very first thing.
Make sure that you have .NET Core 3.1 Preview 1 and Visual Studio 2019 Preview installed.
The latest version of Telerik UI for Blazor is 2.2.1 and it supports .NET Core 3.1 Preview 1.
I only have the 3.0 release of .net core installed. However, my questions still stand.
- What is the "_content" folder mentioned in the example, is this created in the wwwroot folder when adding the nuget feed to the project? Or does one have to create it manually before adding the nuget feed?
- I suppose its obvious, but I will ask - I guess I need to use the 3.1 preview of .net core
To answer the two direct questions first:
- What is the "_content" folder mentioned in the example, is this created in the wwwroot folder when adding the nuget feed to the project? Or does one have to create it manually before adding the nuget feed? - this is the folder that contains the static assets from the packages that the project references. This is where our JS Interop file resides, for example. The build process copies it from the local nuget package that is expanded into the local nuget cache into the project's target folder.
- I suppose its obvious, but I will ask - I guess I need to use the 3.1 preview of .net core - yes. At the moment, .NET Core 3.1. Preview 1 is the latest and the only supported SDK.
I am pasting here my answer to your ticket on the continued 404 of the static asset:
This means that the build did not successfully copy the static assets from our NuGet package into the output folder of the problematic project. This is something that the framework does and we can't influence. The only suggestion I can make is to try the steps from this article: https://docs.telerik.com/blazor-ui/troubleshooting/js-errors. Assuming that the correct package is referenced (not the trial one) the only other hope is that cleaning the bin, obj and local cache folders may help.
Of course, you can also use our CDN.
UI for Blazor