Closed xaverine closed 2 years ago
nuget package doesn't output staticwebassets folder & its content => dntCaptcha.js
- grab dntCaptcha.js from the demo website - manually create staticwebassets folder & its content in user's .nuget dntcaptcha
Windows 10 + Blazor WebAssembly + Asp.Net hosted
DNTCaptcha.Blazor version: 1.1.0 .NET Core SDK version: 5.0
Just trying to get the runtime working
From Asp.Net hosted server...
Exception message: System.IO.DirectoryNotFoundException HResult=0x80070003 Message=C:\[UserFolder]\.nuget\packages\dntcaptcha.blazor\1.1.0\staticwebassets\ Source=Microsoft.Extensions.FileProviders.Physical Full Stack trace: Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters) Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root) Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsFileProvider..ctor(String pathPrefix, String contentRoot) Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.<>c.<UseStaticWebAssetsCore>b__2_0(ContentRootMapping cr) System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext() System.Linq.Enumerable.<OfTypeIterator>d__62`1.MoveNext() System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssetsCore(IWebHostEnvironment environment, Stream manifest) Microsoft.AspNetCore.Hosting.StaticWebAssets.StaticWebAssetsLoader.UseStaticWebAssets(IWebHostEnvironment environment, IConfiguration configuration) Microsoft.AspNetCore.WebHost.<>c.<ConfigureWebDefaults>b__9_0(WebHostBuilderContext ctx, IConfigurationBuilder cb) Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass9_0.<ConfigureAppConfiguration>b__0(HostBuilderContext context, IConfigurationBuilder builder) Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration() Microsoft.Extensions.Hosting.HostBuilder.Build() Server.Program.Main(String[] args)
RC1 couldn't create the NuGet package and now RC2 doesn't add static files. It seems we have to wait for the RTM release.
no prob, manual fix is good for the moment. great work!
Summary of the issue
nuget package doesn't output staticwebassets folder & its content => dntCaptcha.js
Manual fix
Environment
Windows 10 + Blazor WebAssembly + Asp.Net hosted
Example code/Steps to reproduce:
Output:
From Asp.Net hosted server...