2

For MVC5,

I have installed the package: DD4T.LogWrappers.Log4NET using below command successfully:

install-package DD4T.LogWrappers.Log4NET -Version 2.0.0-alpha5

Surprisingly, the DD4T website started throwing below error. When using MVC4, installing the same package is fine.

Below is the Exception logged while calling builder.UseDD4T():

Could not load type 'DD4T.ContentModel.Logging.ILogWrapper' from assembly 'DD4T.ContentModel.Contracts, Version=2.2.1.0, Culture=neutral, PublicKeyToken=4450e3c7f68bf872'

below is the <code>Global.asax.cs</code> file co

I also verified the DLL and there is NO DD4T.ContentModel.Logging folder/namespace present as seen below for MVC5:

enter image description here

2

You seem to be using the wrong DLL for DD4T logging.

Try using DD4T.Logging.Log4Net.dll version 2.2.0
URL: http://www.nuget.org/packages/DD4T.Logging.Log4Net/2.2.0

You seem right that , with MVC5 onwards, The namespace DD4T.ContentModel.Logging is moved to dll DD4T.Core.Contracts.

And, BTW, how and where do you got the DD4T.LogWrapper.Log4NET.dll ? It is unlisted by authors on Nuget.

  • using DD4T.Logging.Log4Net.dll worked like a charm for me. I guess www.nuget.org is the correct website for packages. I mistakenly downloaded the logwrapper dll from STAGING website: staging.nuget.org/packages/DD4T.LogWrappers.Log4NET – Arvind thiag Jun 12 '17 at 4:25
  • What purpose is the staging website of nuget is for ? Also, if it is staging why is it visible to public ? – Arvind thiag Jun 12 '17 at 4:26
0

As you can see, you are installing D4T.LogWrappers.Log4NET -Version 2.0.0-alpha5 version, but you are getting error message related to 2.2.1.0 version

DD4T.ContentModel.Contracts, Version=2.2.1.0

So, I suspect that it is a version mismatch issue and you can resolve it by updating the right version of your dependencies in your package.config file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.