KeyNotFoundException during WPF resource merging

SethSeth Posts: 15 Bronze 1
Our company has been using SmartAssembly for a few releases to obfuscate our applications for a while now. In our new release, we've run through many obfuscation tests and keep getting an exception when building a specific DLL of ours. This exception, a KeyNotFoundException generated by a dictionary, hits during merging WPF resources. I've attached a text file with the exception message as a reference. I've seen other posts where users see this error and jump to knowing a style or other WPF resource that causes the issue, but not how they made that jump nor how they resolved it. If I see this error in the SmartAssembly log, how do I track down which WPF resource is causing the issue, and are there any tips to know how to fix those issues?

Best Answer

  • RichardLRichardL Posts: 417 Gold 4
    Answer ✓
    Hi @Seth

    Thanks for your post. 

    This looks like something a support engineer should take a look at for you so please send us a ticket if you have a support contract and don't end up receiving any support here from the community. 

    Kind regards

    Richard Lynch. 
    Customer Support
    Redgate Software


  • SethSeth Posts: 15 Bronze 1
    And I forgot to attach the error log like I said I would. Here it is.
  • SethSeth Posts: 15 Bronze 1
    Already done, @RichardL. I'm actually waiting to hear back from support regarding the results of a test I performed at their request. Thanks!
  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Thanks @Seth!

    An update on this issue: The problem here was with the BamlRecordType.TypeSerializerInfo attribute in bamlreader, which SmartAssembly was having issues with reading. If anyone is running into this, please contact [email protected] as we have a private build that gets around this.

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?

  • MarkRMarkR Posts: 1 New member
    Just upgraded to SmartAssembly and this issue is still present. When will this problem be addressed in an official (not private build) release?
  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi @MarkR! The build hasn't been fully tested yet which is why the fix hasn't been officially released, though we haven't had any major issues with the few users who have used it. It had been a while since it had come up, so I've asked our developers to take a look into officially releasing it now.

    For now though, if you are running into the same issue with  BamlRecordType.TypeSerializerInfo, I've made a link for the private build here.

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?

Sign In or Register to comment.