• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

293
Views
Wifi Adapter in Blazor wasm : System.DllNotFoundException: api-ms-win-core-winrt-string-l1-1-0.dll

I've been trying to retrieve list of availables networks by using WifiAdapter. I have a working solution that I've been testing in a console application :

        List<WiFiAvailableNetwork> networks = new();
        IEnumerable<WiFiAdapter> adapters = await WiFiAdapter.FindAllAdaptersAsync();
        foreach (WiFiAdapter adapter in adapters)
        {
            foreach (WiFiAvailableNetwork network in adapter.NetworkReport.AvailableNetworks)
            {
                networks.Add(network);
            }
        }
        return networks;

But once this solution is set in my blazor wasm project, it's crashing with this exception : System.TypeInitializationException: The type initializer for 'Windows.Devices.WiFi.WiFiAdapter' threw an exception. d.printErr @ blazor.webassembly.js:1 blazor.webassembly.js:1 ---> System.DllNotFoundException: api-ms-win-core-winrt-string-l1-1-0.dll

I have been looking for an answer but I did not find any relevant solutions. Any ideas on how to solve it/ why it is happening?

Thanks in advance !

about 3 years ago · Santiago Trujillo
2 answers
Answer question

0

Not all parts of the .net platform are supported on all environments.

Blazor WebAssembly will not run anything from Windows.* .

When you want access to some device you will have to research if and how JavaScript can use it.

about 3 years ago · Santiago Trujillo Report

0

You can use an experimental API from browser, calling it via JSRuntime in Blazor WASM.

Look here: https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API

about 3 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error