question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Monitor not available in .NET Standard 2.0

See original GitHub issue

Description

Wanted to make use of Event assertions to count times that events fired, but seems like Monitor isn’t available for .NET Standard 2.0?

We’re trying to do tests for UI components in our UWP library. This restriction doesn’t seem to be called out in the docs. Is there a reason this isn’t available for .NET Standard 2.0?

Expected behavior:

Able to use Event assertions as documented in all target frameworks/standards.

Versions

  • Which version of Fluent Assertions are you using? 5.10.3
  • Which .NET runtime and version are you targeting? .NET Standard 2.0 (UWP .NET Native)

FYI @RosarioPulella

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jnyrupcommented, Apr 7, 2022

@Sergio0694 Thanks for the clarification.

We support net47 and netcoreapp2.1, so according to the docs the implementations that might benefit from System.Reflection.Emit.Lightweight are mono, xamarin.xyz and Unity.

We’ll update the documentation instead of adding a dependency only to throw a better exception before DynamicMethod throws.

0reactions
Sergio0694commented, Apr 6, 2022

UWP apps are 100% AOT and dynamic code generation is not supported, that is correct. The only reason why compiled LINQ expressions work, for instance, is that they have a special interpreter, but that is not available for just manually emitted IL.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Net Standard project doesn't load NetStandard.Library
After the project loads the solution explorer shows the little yellow triangle on NETStandard.Library(2.0.3). The references screen in the ...
Read more >
NET Standard 2.0 is final · Issue #439
AFAIR . NET Standard 2.0 will only be available for FCU and up. Reason being that we needed OS changes to make the...
Read more >
.NET — .NET Standard 2.0 Deprecation, Support for .NET 6 ...
Once we release v23.2, our libraries will no longer support .NET Standard 2.0. I've outlined the reasons for this decision below.
Read more >
Please stop lying about .NET Standard 2.0 support! : r/csharp
NET Standard with stopped being useful. But there is no lie there.
Read more >
Website stopped working (503) after adding .NET Standard ...
I installed the NuGet package System.Globalization to the project and redeployed and after a recycling the application pool the website began ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found