petabridge / NBench

Performance benchmarking and testing framework for .NET applications :chart_with_upwards_trend:
https://nbench.io/
Apache License 2.0
532 stars 46 forks source link

Problem with loading satellite assemblies (.resources) #263

Closed GKotfis closed 4 years ago

GKotfis commented 5 years ago

NBench version: 1.2.2 NBench runner: 1.2.2 App: .NET Framework 4.7.1

I've a problem with tests that reference external .dll with embedded resx (localization).

Exception:

NBench.NBenchException: Error occurred during $PerformanceTest.Domain.RunExport.RunExport_Crash_Test_NBench+Benchmark SETUP. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Core.resources, Version=7.0.0.0, Culture=en-US, PublicKeyToken=15b6e611f3f1965f' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

Error occurs durring fetching resource using ResourceManager.GetString()

I did some check and in the same project add NUnit with exactly the same test code and run it using nunit3 console runner without any errors.

What could I check, set? Maybe something with AppDomain?

Aaronontheweb commented 4 years ago

Not sure what the issue is, but we're doing away with external test runners altogether in NBench 2.0. It'll be run directly inside a Program.cs going forward.