1

I've written a custom resolver to block publish transactions from certain publications by referring through below blog https://www.sdltridionworld.com/community/2011_extensions/childpublicationsonlyresolver.aspx.

Our deployment server don't have .NET SDK, so no GACutil.

So, I created a setup project and installed MSIL to register the DLL in the GA_MSIL. DLL is present in the GAC MSIL.

When i publish any item from the CMS, it throws following error.

Could not load type '***' from assembly 'ChildPublicationsOnlyResolver, Version=2.0.0.0, Culture=neutral, PublicKeyToken=26c2d68fe54df544'.
Component: Tridion.ContentManager.Publishing
Errorcode: 0
User: NT AUTHORITY\SYSTEM

StackTrace Information Details:
   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at Tridion.ContentManager.Publishing.Resolving.ResolveEngine.GetResolversFromConfiguration(IEnumerable`1 itemTypes)
   at Tridion.ContentManager.Publishing.Resolving.ResolveEngine.ResolveItems(IEnumerable`1 items, ResolveInstruction instruction, IEnumerable`1 contexts)
   at Tridion.ContentManager.Publishing.Resolving.ResolveEngine.ResolveItem(IdentifiableObject item, ResolveInstruction instruction, PublishContext context)
   at Tridion.ContentManager.Publishing.Handling.DefaultPublishTransactionHandler.HandlePublishRequest(PublishTransaction publishTransaction)
   at Tridion.ContentManager.Publishing.Handling.DefaultPublishTransactionHandler.ProcessPublishTransaction(PublishTransaction publishTransaction)
   at Tridion.ContentManager.Publishing.Publisher.QueueMessageHandler.HandleMessage()

When i copy the DLL manually to the GAC_MSIL, publishing works fine.

Please provide your suggestions and inputs!

2
  • 2
    UnreadableQuestionException ;-) Commented Feb 19, 2016 at 12:36
  • i think this is generic .net question, isn't it? you wanted to copy dll in GAC. when you manually copy paste, do it replace the existing or you see multiple entries in GAC viewer.
    – Raj Kumar
    Commented Feb 20, 2016 at 11:54

1 Answer 1

1

There are actually multiple GAC_MSIL directories

  1. %windir%\assembly\GAC_MSIL - for .net framework 2.0 and 3.5 or less than 4.0
  2. %windir%\Microsoft.NET\assembly\GAC_MSIL - For net framwork 4+

make sure you putting in the correct one.

6
  • Registered the dll using MSIL and using .net framework 4+ and it is located in the %windir%\Microsoft.NET\assembly\GAC_MSIL
    – k951
    Commented Feb 22, 2016 at 6:15
  • so what's exactly issue now?
    – Raj Kumar
    Commented Feb 22, 2016 at 7:21
  • when try to publish any items from CMS Could not load type 'TridionCMS.ChildPublicationsOnlyResolver' from assembly 'ChildPublicationsOnlyResolver, Version=2.0.0.0, Culture=neutral, PublicKeyToken=26c2d68fe54df544'.
    – k951
    Commented Feb 22, 2016 at 7:45
  • few points to check. 1) check TridionCMS.ChildPublicationsOnlyResolver class exist , try recompile & put again 2) check , its if another version of assembly at some location and that is getting loaded instead of latest version, change the version to check.
    – Raj Kumar
    Commented Feb 22, 2016 at 7:59
  • when copy paste the dll in the GAC_MSIL it is not replacing seeing mulitple entries
    – k951
    Commented Feb 22, 2016 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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