-1

Summary

This week i began working on our next iteration of one of our tools "Hanger Preparation" which is part of an addin toolset for Autodesk Revit built using WPF, MVVM, C#, Visual Studio 2017 and Telerik Controls for WPF.

We decided to split our"Hanger Tools" features into a separate windows/workflows "Hanger Preparation 2019" and "Hanger Tagging 2019".

I simply copied the original View and View Model and created two new Views and ViewModels and renamed all of the required Classes, Constructors, etcetera.

The new Views/View Models render/open as expected in Revit 2018 but not in Revit 2019.

The problem is that the two new Views, "Hanger Preparation 2019" and "Hanger Tagging 2019", return a "System.IO.FileNotFound" exception for the assembly/.dll "Telerik.Windows.Controls.Input" then the window actually opens but it is rendered black.

You can utimately get them to open if you fist open the original "Hanger Preparation" tool, close it and again attempt to open either of the problem windows "Hanger Preparation 2019" and "Hanger Tagging 2019". Screen capture video of behavior can be seen here. Quality is better if downloaded rather than streamed from Dropbox.

What Have i tried?

Debugging the project yeilded no solution for me. Searching the web for similar problems did not yield results. The recent version of Autdesk Revit 2019 seems to have limited API questions/activity.

Submitted this to Telerik https://www.telerik.com/account/support-tickets/view-ticket/1401014 but they are scratching their heads about it.

Submitted an Autodesk Revit API forum thread https://forums.autodesk.com/t5/revit-api-forum/addin-wpf-windows-renders-as-expected-in-2018-not-2019/td-p/8671642

This solution seemed similar but no solution came of it. https://www.telerik.com/forums/could-not-load-file-or-assembly-'telerik-windows-controls-anycontrol-'

Images Screenshot 2 References Are Intact Screenshot 3 Exception In XAML Screenshot 4 New View/View Models are in same directroy as the Original View/View Model.

1 Answers1

0

Suggestion: use the standard OS functionality to search globally for Telerik.Windows.Controls.Input.dll to determine its full path. Use standard .NET functionality to load the DLL before anything else happens. Now that it is residing in the Revit memory space and AppDomain, it should be found by every further client that comes along later and requires it.

Jeremy Tammik
  • 7,333
  • 2
  • 12
  • 17
  • Jeremy, thank you for this suggestion as a potential solution! This suggestion as well as a solution (https://stackoverflow.com/a/33128285/9154327) posted by Colin Stark of StarkBIM did the trick! I also reached out to him to confirm that this solution is still a viable one for him to which he responded affimatively.  Glad to have this behind me! Thanks again Jeremy! – Chris Hildebran Mar 28 '19 at 15:30