【发布时间】:2021-08-20 12:14:18
【问题描述】:
我尝试从这里为我的 Blazor-App 使用 BarcodeScanner-Component:
https://www.nuget.org/packages/BlazorBarcodeScanner.ZXing.JS/
当我启动我的应用程序时,我总是会遇到一些异常。第一个是:
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Could not find 'BlazorBarcodeScanner.listVideoInputDevices' ('BlazorBarcodeScanner' was undefined).
Error: Could not find 'BlazorBarcodeScanner.listVideoInputDevices' ('BlazorBarcodeScanner' was undefined).
at https://localhost:44327/_framework/blazor.webassembly.js:1:1287
at Array.forEach (<anonymous>)
at e.findFunction (https://localhost:44327/_framework/blazor.webassembly.js:1:1247)
at b (https://localhost:44327/_framework/blazor.webassembly.js:1:2989)
at https://localhost:44327/_framework/blazor.webassembly.js:1:3935
at new Promise (<anonymous>)
at Object.beginInvokeJSFromDotNet (https://localhost:44327/_framework/blazor.webassembly.js:1:3908)
at Object.w [as invokeJSFromDotNet] (https://localhost:44327/_framework/blazor.webassembly.js:1:64232)
at _mono_wasm_invoke_js_blazor (https://localhost:44327/_framework/dotnet.5.0.7.js:1:190800)
at do_icall (<anonymous>:wasm-function[10596]:0x194e4e)
有人可以帮助我,这个异常的原因是什么? 我想我错过了一些设置,但我不知道哪个/在哪里。
【问题讨论】:
-
添加引用和使用包的所有代码。还要提到 .net 和包版本。
标签: blazor zxing blazor-webassembly