I am running 1.3.0 and .Net Core preview 6
This is a server side Blazor application.
Locally the project runs fine, but when I deploy to IIS I get the following error when I hit the page:
An error occurred while starting the application.
DirectoryNotFoundException: C:\Users\longk\.nuget\packages\telerik.ui.for.blazor\1.3.0\staticwebassets\
Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(string root, ExclusionFilters filters)
DirectoryNotFoundException: C:\Users\longk\.nuget\packages\telerik.ui.for.blazor\1.3.0\staticwebassets\
Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(string root, ExclusionFilters filters)
Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(string root)
Microsoft.AspNetCore.StaticWebAssetsFileProvider..ctor(string pathPrefix, string contentRoot)
Microsoft.AspNetCore.StaticWebAssetsLoader+<>c.<UseStaticWebAssetsCore>b__2_0(ContentRootMapping cr)
System.Linq.Enumerable+SelectEnumerableIterator<TSource, TResult>.MoveNext()
System.Linq.Enumerable.OfTypeIterator<TResult>(IEnumerable source)+MoveNext()
System.Collections.Generic.List<T>..ctor(IEnumerable<T> collection)
System.Linq.Enumerable.ToList<TSource>(IEnumerable<TSource> source)
Microsoft.AspNetCore.StaticWebAssetsLoader.UseStaticWebAssetsCore(IWebHostEnvironment environment, Stream manifest)
Microsoft.AspNetCore.StaticWebAssetsLoader.UseStaticWebAssets(IWebHostEnvironment environment)
Microsoft.AspNetCore.WebHost+<>c.<ConfigureWebDefaults>b__9_0(WebHostBuilderContext ctx, IConfigurationBuilder cb)
Microsoft.AspNetCore.Hosting.Internal.GenericWebHostBuilder+<>c__DisplayClass8_0.<ConfigureAppConfiguration>b__0(HostBuilderContext context, IConfigurationBuilder builder)
Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration()
Microsoft.Extensions.Hosting.HostBuilder.Build()
ScheduledFeatureEditor.Program.Main(string[] args) in Program.cs
NOTE: The directory that is saying is not found is my local directory on the build machine, not the server that I deployed to. I'm not sure where that is coming from.
I am not using static assets (or at least I don't think I am). Here is my script reference from _Host.cshtml:
<script src="https://kendo.cdn.telerik.com/blazor/1.3.0/telerik-blazor.min.js" defer></script>
Here are some snippets from Startup that show I am including the telerik blazor stuff:
public void ConfigureServices(IServiceCollection services)
{
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddTelerikBlazor();
And also I am including static file handling in startup:
app.UseStaticFiles();
If I change the code to use the static asset version like this:
<script src="_content/telerikuiforblazor/js/telerik-blazor.js" defer></script>
and then redeploy I get the same error.
Any ideas?
Thanks,
Kenny Long