Brightspace / rules_csharp

Bazel rules for C#
Apache License 2.0
8 stars 5 forks source link

Support .NET Standard in csharp_nunit_test #27

Closed j3parker closed 5 years ago

j3parker commented 5 years ago

In #26 I realized that we don't actually support .NET Standard tests because we create an executable (Bazel wants tests to be executable) using NUnitLite.

We could, instead, produce a DLL without NUnitLite, and separately an exe that loads the test DLL (and its dependencies) at runtime. That exe could be the latest .NET Core framework.

Related issues:

jimevans commented 5 years ago

I think it's a reasonable limitation to support only .NET Core unit tests for testing libraries that are .NET Standard libraries. Since the Visual Studio MSTest framework doesn't support testing .NET Standard test projects directly, my suspicion is that most users who have a .NET Standard library already target their test projects for that library as .NET Core.

j3parker commented 5 years ago

Oh ya, I was totally over-thinking this. Your tests don't need to be written against .NET Standard to test a .NET Standard library. Got it.