Code Red > .NET

WPF Resource Dictionary

(1/1)

jtoverka:
Hello All,

I have an issue that popped up when I was separating code into respective libraries. I have a vs project called BasicWPF. Inside is a StyleDictionary for WPF XAML. I reference that resource dictionary elsewhere in other projects. I have applications that run outside of AutoCAD that run just fine.

The issue is when I run a project inside AutoCAD an Error pops up. It's pretty clear, a FileNotFoundException on BasicWPF, which is triggered from the ResourceDictionary reference in XAML. Now this BasicWPF is indeed in the project directory. I have another application in the same directory that references that dll and it runs just fine outside of AutoCAD.

Has anyone experienced this issue?

jtoverka:
Should have looked more closely. Solution here:
http://www.theswamp.org/index.php?topic=54708.msg592308#msg592308

helaman:
Something similar happened to me.
You have to load the dll at the beginning of your command.
The dll has to be in the root folder.

--- Code - C#: ---Assembly.LoadFrom(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "MaterialDesignThemes.Wpf.dll"));

Navigation

[0] Message Index

Go to full version