title: Blazor WASM can be debugged but cannot be released
body: <p>I used blazor to create an application that runs correctly in debug state, but I can't publish it. Under release state, I get the following errors:</p>
  <pre><code>Fatal error in Mono IL Linker
  C:\Users\admin\.nuget\packages\microsoft.aspnetcore.components.webassembly.build\3.2.0\targets\Blazor.MonoRuntime.targets(326,5): error : Unhandled exception. Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.InteropServices.PInvoke, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   ---&gt; Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'System.Runtime.InteropServices.PInvoke, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
     at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
     at Mono.Linker.AssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
     at Mono.Linker.LinkContext.Resolve(IMetadataScope scope)
     at Mono.Linker.LinkContext.Resolve(IMetadataScope scope)
     at Mono.Linker.LinkContext.ResolveReferences(AssemblyDefinition assembly)
     at Mono.Linker.Steps.LoadReferencesStep.ProcessReferences(AssemblyDefinition assembly)
     at Mono.Linker.Steps.LoadReferencesStep.ProcessAssembly(AssemblyDefinition assembly)
     at Mono.Linker.Steps.BaseStep.Process(LinkContext context)
     at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
     at Mono.Linker.Pipeline.Process(LinkContext context)
     at Mono.Linker.Driver.Run(ILogger customLogger)
     at Mono.Linker.Driver.Execute(String[] args, ILogger customLogger)
     at Mono.Linker.Driver.Main(String[] args)
  C:\Users\admin\.nuget\packages\microsoft.aspnetcore.components.webassembly.build\3.2.0\targets\Blazor.MonoRuntime.targets(326,5): error : ILLink failed with exit code -532462766.
  </code></pre>
  <p>I don't know what happened. Can anyone help me? Thank you!</p>