Completed
Last Updated: 02 Feb 2021 09:30 by ADMIN
Eric
Created on: 16 Nov 2020 17:00
Type: Bug Report
0
Exception in net5.0 app

when using JustMock Free in a net 5.0 app.  I am getting an Ninject exception that IAssemblyNameRetriever could not be found.  Looking at the code on github,

the NETCORE compile constant removes the line

AddComponent<IAssemblyNameRetriever, AssemblyNameRetriever>();

from StandardKernel.cs

however, CompiledModuleLoaderPlugin uses IAssemblyNameRetriever in it's constructor and

AddComponent<IModuleLoaderPlugin, CompiledModuleLoaderPlugin>();

is still included in the NETCORE version.

 

 

7 comments
ADMIN
Mihail
Posted on: 02 Feb 2021 09:30

Hello Eric,

The fix was shipped with R3 SP2 2020 and it is available with our latest official release R1 2021(2021.1.115.1). You could try it and get back to us if you encounter any issues.

Regards,
Mihail
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

ADMIN
Ivo
Posted on: 17 Nov 2020 12:46

Hello Eric,

I am glad to hear that the temporary fix is working for you. We will let you know once we have an official release for it.

Regards,
Ivo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Eric
Posted on: 17 Nov 2020 12:20

Thanks.

That is exactly what I did. 

ADMIN
Ivo
Posted on: 17 Nov 2020 12:12

Hello Eric,

Thank you for letting us know about this issue. We have made some changes related to another feature and this is the reason for this failure. I have prepared a fix for this issue and we are going to release it shortly. If the problem is a kind of blocking for you, as a temporary solution, you can clone and build JustMock locally using the branch from the pull request.

Regards,
Ivo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Eric
Posted on: 16 Nov 2020 21:36

Once you get the nuget package in the project, just run

ShouldCallConstructorRequiringPrimitiveArgumentConversions

in netcoreapp3.1 and you will get the exception.

 

Eric
Posted on: 16 Nov 2020 21:32

So the problem boils down to Net Core in conjunction with having the nuget package ninject.extensions.conventions in the project.

Once you have those two things, in ModuleLoader.LoadModules, fileGroups ends up having items.

Then:

IModuleLoaderPlugin plugin = plugins.Where(p => p.SupportedExtensions.Contains(extension)).FirstOrDefault();

gets called and one one the plugins is CompiledModuleLoaderPlugin which can't be used as IAssemblyNameRetriever is never mapped.

Let me know if you need more information.

 

ADMIN
Mihail
Posted on: 16 Nov 2020 17:53

Hello Eric,

It seems we are missing a unit test for this scenario. Could you be so kind as to share the test case with which you found this issue?

Regards,
Mihail
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.