Skip to content

First Chance Exception in RuntimeFramework #3068

@ChrisMaddock

Description

@ChrisMaddock

I've started seeing a first chance exception from line 82 below. Looking at the code, it makes sense that this might be suppressed by adding the false parameter, to suppress errors due to missing dependencies.

{
Type monoRuntimeType = Type.GetType("Mono.Runtime", false);
Type monoTouchType = Type.GetType("MonoTouch.UIKit.UIApplicationDelegate,monotouch");
bool isMonoTouch = monoTouchType != null;
bool isMono = monoRuntimeType != null;
bool isNetCore = !isMono && !isMonoTouch && IsNetCore();

What's unclear at the moment is why I've never seen this before - this codes been in place for 3 years. Filing an issue rather than a PR, and I'll aim to dig into it soon. I suspect it's an implementation detail difference between .NET Core and .NET Framework

Call is coming via the creation of a PlatformHelper in TestCaseAttribute.BuildFrom. Incidentally, we should skip that call if the IncludePlatform and ExcludePlatform properties are empty - creating a PlatformHelper calculates the current framework, and all available frameworks, so ain't cheap.

Using NUnit 3.11, .NET Standard 2.0 running on .NET Core 2.1 on Windows.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions