MissingMethodException
You may see the following exception in a browser when you use Blazor WebAssembly Scheduler:
System.MissingMethodException: Constructor on type ‘System.ComponentModel.Int32Converter’ not found.
To resolve this issue, do one of the following:
- Set the
BlazorWebAssemblyEnableLinking
property tofalse
in the project file to disable the link with an MSBuild property.<PropertyGroup> ... <BlazorWebAssemblyEnableLinking>false</BlazorWebAssemblyEnableLinking> </PropertyGroup>
- Add the LinkerConfig.xml file and include the following code:
Then specify this file as an MSBuild item in the project file.<?xml version="1.0" encoding="UTF-8" ?> ... <linker> ... <assembly fullname="System"> <!-- Use this line to include the entire assembly. --> <type fullname="System.ComponentModel*" /> <!-- Uncomment the following lines to include individual types. --> <!-- <type fullname="System.ComponentModel.Int32Converter*" /> <type fullname="System.ComponentModel.BooleanConverter*" /> <type fullname="System.ComponentModel.DateTimeConverter*" /> <type fullname="System.ComponentModel.StringConverter*" /> --> ... </assembly> </linker>
<ItemGroup> ... <BlazorLinkerDescriptor Include="LinkerConfig.xml" /> </ItemGroup>
See the following topic for more information: Configure the Linker for ASP.NET Core Blazor.