-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ComponentNotRegisteredException when executing test cases using NUnit Console 3.16.3 (Release) #1391
Comments
Can you please check the 3.17 version. The 3.16 series are abandoned, and 3.17 is a continuation of 3.15, which is what is used in the adapter, and thus dotnet and Visual Studio. |
Updated to 3.17. It provides me with the same results. |
Ok, that means the error is in the console code, not in the engine code. Or, that you need to add something to the Autofac registration, that is, scanning is not enough. Suggest you also upload a small repro that reproduce this error. And, do you really need to use the console, can you use |
Raised the question with the Autofac guys, but they dismissed it saying that it is most likely a problem with environment, which is quite fair argument I guess. Our existing pipeline has been using console runner and I was just hoping it would still work onwards. However, thanks for the tip - I just tested it with Do you want me to set up small repo to preproduce this issue that could help you trace what could be wrong with it ? |
Good to hear that dotnet test works for you.
It would be awesome, then we having something to check when we get to this. |
We recently lifted .NET Framework project to .NET 7. All went without major complications, but we encountered an issue when we were trying to execute test cases from a .NET 7 test library using NUnit Console 3.16.3 (Release). The interesting fact is that the tests are running fine when ran from Visual Studio, but as longs as we run them from the console runner the following error is encountered.
In the test case we use IoC (Autofac 7.0.1) and we are loading assembly modules using Module Scanning. Module scanning is performed with the RegisterAssemblyModules() registration method, which does exactly what its name suggests.
When trying to resolve registered assembly / ies (see below) the exception mentioned in the beginning is thrown.
I am not sure this is the correct place to report this, but the whole thing works fine in the Visual Studio environment, but not through the NUnit Console 3.16.3 (Release).
The text was updated successfully, but these errors were encountered: