[browser] avoid reflection on JSExport #122024
+229
−123
Draft
Build Analysis / Build Analysis
failed
Nov 28, 2025 in 0s
.NET Result Analysis
Details
Tip
To unconditionally bypass the build analysis check (turn it green), you can use the escape mechanism feature. The completion time may vary, potentially taking several minutes, depending on the build analysis workload at the moment.
Build Failures
runtime / Build / browser-wasm linux Release MultiThreaded_BuildOnly / Build product
[ 🚧 Report infrastructure issue] [ 📄 Report repository issue]-
❌src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHostImplementation.cs(314,32): error CS8602: Dereference of a possibly null reference.
-
❌src/libraries/System.Runtime.InteropServices.JavaScript/src/System/Runtime/InteropServices/JavaScript/JSHostImplementation.cs(349,32): error CS8602: Dereference of a possibly null reference.
runtime / Build / browser-wasm windows Release MultiThreaded_BuildOnly / Build product
[ 🚧 Report infrastructure issue] [ 📄 Report repository issue]-
❌src\libraries\System.Runtime.InteropServices.JavaScript\src\System\Runtime\InteropServices\JavaScript\JSHostImplementation.cs(314,32): error CS8602: Dereference of a possibly null reference.
-
❌src\libraries\System.Runtime.InteropServices.JavaScript\src\System\Runtime\InteropServices\JavaScript\JSHostImplementation.cs(349,32): error CS8602: Dereference of a possibly null reference.
Test Failures (30 tests failed)
🔹 [All failing tests from runtime]
- net10.0-linux-Debug-x64-Mono_Minijit_Debug-Ubuntu.2204.Amd64.Open
- AzureLinux.3.0.ArmArch.Open
- net10.0-linux-Debug-x64-Mono_Interpreter_Debug-Ubuntu.2204.Amd64.Open
- net10.0-osx-Debug-x64-Mono_Minijit_Debug-OSX.15.Amd64.Open
- Alpine.322.Amd64.Open
- net10.0-windows-Release-x86-coreclr_release-Windows.Server2025.Amd64.Open
- net10.0-linux-Debug-x64-coreclr_release-Ubuntu.2204.Amd64.Open
- AzureLinux.3.0.Amd64.Open
- Centos.10.Amd64.Open
- net10.0-osx-Debug-x64-coreclr_release-OSX.15.Amd64.Open
- net10.0-osx-Debug-x64-coreclr_checked-OSX.15.Amd64.Open
- net10.0-windows-Debug-x64-coreclr_release-Windows.Amd64.Server2022.Open
- net10.0-windows-Debug-x64-coreclr_release-Windows.Server2025.Amd64.Open
- net10.0-windows-Debug-x64-coreclr_release-Windows.11.Amd64.Client.Open
- Windows.Nano.1809.Amd64.Open
- Exception Message
System.InvalidOperationException : Context: Source generator application Context: Verifying source generated files content of 'Microsoft.Interop.JavaScript.JSImportGenerator/Microsoft.Interop.JavaScript.JSExportGenerator/JSExports.g.cs' did not match. Diff shown with expected as baseline: // <auto-generated/> namespace System.Runtime.InteropServices.JavaScript { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute] unsafe class __GeneratedInitializer { [global::System.ThreadStaticAttribute] static bool initialized; [global::System.Runtime.CompilerServices.ModuleInitializerAttribute, global::System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods | global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods, "System.Runtime.InteropServices.JavaScript.__GeneratedInitializer", "TestProject")] static internal void __TrimmingPreserve_() { }static void __Register_() { if (initialized || global::System.Runtime.InteropServices.RuntimeInformation.OSArchitecture != global::System.Runtime.InteropServices.Architecture.Wasm) return; initialized = true;-
global::System.Runtime.InteropServices.JavaScript.JSFunctionBinding.BindManagedFunction(Basic.__Wrapper_AnnotatedExport_1583225186 ,"AnnotatedExport", 1583225186, [global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Discard, global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Object, global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Int52, global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.BigInt64, global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Action(), global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Function(global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Int32), global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Span(global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Byte), global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.ArraySegment(global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Byte), global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Task(global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Object), global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Array(global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Object), global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.DateTime, global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.DateTimeOffset, global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Task(global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.DateTime), global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Task(global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.DateTimeOffset), global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Task(global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Int52), global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Task(global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.BigInt64)]);
-
global::System.Runtime.InteropServices.JavaScript.JSFunctionBinding.BindManagedFunction(Basic.__Wrapper_AnnotatedExport_1583225186, "AnnotatedExport", 1583225186, [global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Discard, global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Object, global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Int52, global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.BigInt64, global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Action(), global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Function(global:</pre></dd>- CallStack
at Microsoft.CodeAnalysis.Testing.DefaultVerifier.Fail(String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DefaultVerifier.cs:line 105 at Microsoft.CodeAnalysis.Testing.IVerifierExtensions.EqualOrDiff(IVerifier verifier, String expected, String actual, String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/Extensions/IVerifierExtensions.cs:line 67 at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1[[Microsoft.CodeAnalysis.Testing.DefaultVerifier, Microsoft.CodeAnalysis.Analyzer.Testing, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].<VerifySourceGeneratorAsync>g__VerifyDocuments|66_0(IVerifier verifier, ImmutableArray`1 actualDocuments, ImmutableArray`1 expectedDocuments, Boolean allowReordering, String defaultFilePathPrefix, Func`3 getNameAndFolders, TimeSpan matchTimeout) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 421 at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<VerifySourceGeneratorAsync>d__66[[Microsoft.CodeAnalysis.Testing.DefaultVerifier, Microsoft.CodeAnalysis.Analyzer.Testing, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 313 at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<VerifySourceGeneratorAsync>d__65[[Microsoft.CodeAnalysis.Testing.DefaultVerifier, Microsoft.CodeAnalysis.Analyzer.Testing, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 268 at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<RunImplAsync>d__62[[Microsoft.CodeAnalysis.Testing.DefaultVerifier, Microsoft.CodeAnalysis.Analyzer.Testing, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 202 at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<RunAsync>d__61[[Microsoft.CodeAnalysis.Testing.DefaultVerifier, Microsoft.CodeAnalysis.Analyzer.Testing, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 172 at JSImportGenerator.Unit.Tests.Compiles.ValidateGeneratedSourceOutput_AllAnnotatedParameters() in /_/src/libraries/System.Runtime.InteropServices.JavaScript/tests/JSImportGenerator.UnitTest/Compiles.cs:line 269
--- End of stack trace from previous location ---
-
- net10.0-linux-Debug-x64-Mono_Minijit_Debug-Ubuntu.2204.Amd64.Open
- AzureLinux.3.0.ArmArch.Open
- net10.0-linux-Debug-x64-Mono_Interpreter_Debug-Ubuntu.2204.Amd64.Open
- net10.0-osx-Debug-x64-Mono_Minijit_Debug-OSX.15.Amd64.Open
- Alpine.322.Amd64.Open
- net10.0-windows-Release-x86-coreclr_release-Windows.Server2025.Amd64.Open
- net10.0-linux-Debug-x64-coreclr_release-Ubuntu.2204.Amd64.Open
- AzureLinux.3.0.Amd64.Open
- Centos.10.Amd64.Open
- net10.0-osx-Debug-x64-coreclr_release-OSX.15.Amd64.Open
- net10.0-osx-Debug-x64-coreclr_checked-OSX.15.Amd64.Open
- net10.0-windows-Debug-x64-coreclr_release-Windows.Amd64.Server2022.Open
- net10.0-windows-Debug-x64-coreclr_release-Windows.Server2025.Amd64.Open
- net10.0-windows-Debug-x64-coreclr_release-Windows.11.Amd64.Client.Open
- Windows.Nano.1809.Amd64.Open
- Exception Message
System.InvalidOperationException : Context: Source generator application Context: Verifying source generated files content of 'Microsoft.Interop.JavaScript.JSImportGenerator/Microsoft.Interop.JavaScript.JSExportGenerator/JSExports.g.cs' did not match. Diff shown with expected as baseline: // <auto-generated/> namespace System.Runtime.InteropServices.JavaScript { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute] unsafe class __GeneratedInitializer { [global::System.ThreadStaticAttribute] static bool initialized; [global::System.Runtime.CompilerServices.ModuleInitializerAttribute, global::System.Diagnostics.CodeAnalysis.DynamicDependencyAttribute(global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods | global::System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods, "System.Runtime.InteropServices.JavaScript.__GeneratedInitializer", "TestProject")] static internal void __TrimmingPreserve_() { }static void __Register_() { if (initialized || global::System.Runtime.InteropServices.RuntimeInformation.OSArchitecture != global::System.Runtime.InteropServices.Architecture.Wasm) return; initialized = true;-
global::System.Runtime.InteropServices.JavaScript.JSFunctionBinding.BindManagedFunction(Basic.__Wrapper_Export1_622134597 ,"Export1", 622134597, [global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Task(global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Int32)]);
-
}
global::System.Runtime.InteropServices.JavaScript.JSFunctionBinding.BindManagedFunction(Basic.__Wrapper_Export1_622134597, "Export1", 622134597, [global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Task(global::System.Runtime.InteropServices.JavaScript.JSMarshalerType.Int32)]); }
}
unsafe partial class Basic
{
[global::System.Diagnostics.DebuggerNonUserCode]
public static unsafe void __Wrapper_Export1_622134597(global::System.IntPtr __arguments_ptr)
{
-
var __arguments_buffer = (global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*) __arguments_ptr;
-
}
global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument* __arguments_buffer = (global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument*)__arguments_ptr; __Stub(__arguments_buffer, __arguments_buffer + 1); [global::System.Diagnostics.DebuggerNonUserCode] void __Stub(global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument* ____arg_exception_native__param, global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument* __invokeRetValUnmanaged__param) { ref global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument ____arg_exception_native = ref *____arg_exception_native__param; ref global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument __invokeRetValUnmanaged = ref *__invokeRetValUnmanaged__param; global::System.Threading.Tasks.Task<int> __invokeRetVal = default; try { __invokeRetVal = global::Basic.Export1(); // Marshal - Convert managed data to native data. __invokeRetValUnmanaged.ToJS(__invokeRetVal, static (ref global::System.Runtime.InteropServices.JavaScript.JSMarshalerArgument __task_result_arg, int __task_result) => { __task_result_arg.ToJS(__task_result); }); } catch (global::System.Exception __arg_exception) { ____arg_exception_native.ToJS(__arg_exception); } }
}
-
- CallStack
at Microsoft.CodeAnalysis.Testing.DefaultVerifier.Fail(String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/DefaultVerifier.cs:line 105 at Microsoft.CodeAnalysis.Testing.IVerifierExtensions.EqualOrDiff(IVerifier verifier, String expected, String actual, String message) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/Extensions/IVerifierExtensions.cs:line 67 at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1[[Microsoft.CodeAnalysis.Testing.DefaultVerifier, Microsoft.CodeAnalysis.Analyzer.Testing, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].<VerifySourceGeneratorAsync>g__VerifyDocuments|66_0(IVerifier verifier, ImmutableArray`1 actualDocuments, ImmutableArray`1 expectedDocuments, Boolean allowReordering, String defaultFilePathPrefix, Func`3 getNameAndFolders, TimeSpan matchTimeout) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 421 at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<VerifySourceGeneratorAsync>d__66[[Microsoft.CodeAnalysis.Testing.DefaultVerifier, Microsoft.CodeAnalysis.Analyzer.Testing, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 313 at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<VerifySourceGeneratorAsync>d__65[[Microsoft.CodeAnalysis.Testing.DefaultVerifier, Microsoft.CodeAnalysis.Analyzer.Testing, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 268 at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<RunImplAsync>d__62[[Microsoft.CodeAnalysis.Testing.DefaultVerifier, Microsoft.CodeAnalysis.Analyzer.Testing, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 202 at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<RunAsync>d__61[[Microsoft.CodeAnalysis.Testing.DefaultVerifier, Microsoft.CodeAnalysis.Analyzer.Testing, Version=1.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext() in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 172 at JSImportGenerator.Unit.Tests.Compiles.ValidateGeneratedSourceOutput_Return() in /_/src/libraries/System.Runtime.InteropServices.JavaScript/tests/JSImportGenerator.UnitTest/Compiles.cs:line 391 --- End of stack trace from previous location ---
❌ JSImportGenerator.Unit.Tests.Compiles.ValidateGeneratedSourceOutput_AllAnnotatedParameters [Console] [Details] [Artifacts] [0.16% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]
Failing Configurations (15)
❌ JSImportGenerator.Unit.Tests.Compiles.ValidateGeneratedSourceOutput_Return [Console] [Details] [Artifacts] [0.16% failure rate]
-
[ 🚧 Report test infrastructure issue] [ 📄 Report test repository issue]
Failing Configurations (15)
Loading